1. Fabio Michelini
  2. django-swingcms

Source

django-swingcms / swingcms / cms / templates / cms / add_change_collector.html

Diff from to

File swingcms/cms/templates/cms/add_change_collector.html

 
 
 
-<script type="text/javascript">
-    $(document).ready(function() {
-        display_file_input_field_on_change();
-        hide_all_file_input_field();
-    });
-// se contiene Criterion mostra o nascondi se checked o no
-</script>
+<div id='form'>
 
+    {% if introduction %}
+	    {{ introduction }}
+        <br/>
+    {% else %}
+    {% endif %}
 
+    {% blocktrans %}Fields marked with <img src='{{ STATIC_URL }}cms/icons/asterix.png' alt="required"> are required.{% endblocktrans %}<br/>
 
-{% if toolbar %}
+    {% if form.non_field_errors %}
+        <br/>
+        <div class='error'>{{ form.non_field_errors }}</div>
+        <br/>
+    {% else %}
 
-    {% include 'cms/texteditor.html' %}
+        {% if form.errors %}
+            <br/>
+	        <div class='error'>{% trans 'Please correct the error below.' %}</div>
+        {% else %}
+        {% endif %}
 
-{% endif %}
+    {% endif %}
 
 
-{% if introduction %}
-    <br />
-	{{ introduction }}
-    <br />
-{% else %}
 
-{% endif %}
+    <br/>
+    <form enctype="multipart/form-data" method="post" action="" onsubmit="js_single_submit();">
 
-{% blocktrans %}Fields marked with <img src='{{ STATIC_URL }}cms/icons/asterix.png' alt="required"> are required.{% endblocktrans %}<br />
+        {% csrf_token %}
 
-{% if form.errors %}
-    <br />
-	<div class='error'>{% trans 'Please correct the error below.' %}</div>
-    <br />
-{% else %}
+	    <table>
 
-{% endif %}
+		    {% for f in form %}
 
-{% if form.non_field_errors %}
-    <br />
-    <div class='error'>{{ form.non_field_errors }}</div>
-    <br />
-{% else %}
+                <tr><td></td><td>{{ f.errors }}</td></tr>
 
-{% endif %}
+                <tr{% if 'criterion' in f.name %} class='criterion'{% endif %}>
+                    <th>{% if f.label %}<label{% if 'required' in f.css_classes %} class='required' {% endif %}>{{ f.label }}</label>{% endif %}</th>
+                    <td>{{ f.as_widget }}</td>
+                </tr>
 
+                <tr><td></td><td class='help_text'>{{ f.help_text }}<br /><br /></td></tr>
 
-<br />
-<form enctype='multipart/form-data' method='post' action=''>
+            {% endfor %}
 
-    <table>
+	        <tr><td></td><td>
+                <input type="submit" name="submit" value="Submit"
+                {% if require_submit_confirm %}
+                    onclick="return confirm('{% trans "Are you sure?" %}')"
+                {% endif %}>
+            </td></tr>
+            <tr><td></td><td><input type="hidden" name='next' value="{{ next }}"></td></tr>
 
-    {% for f in form %}
+	    </table>
 
-        <tr>
-            {% if 'criterion' in f.name %}
-                <td>
-                    <br />
-                    <br />
-                </td>
-                <td>
-                    <br />
-                    <br />
-                </td>
-            {% else %}
-                <td>
-                </td>
-                <td>
-                    {{ f.errors }}
-                </td>
-            {% endif %}
-        </tr>
+    </form>
 
-        <tr{% if 'required' in f.css_classes and not 'param' in f.name %} class='required' {% endif %}>
+    {% if notes %}
+        <br/>
+	    {{ notes }}
+    {% else %}
+    {% endif %}
 
-            <th>{% if f.label %}
-                <label>
-                    {% if 'criterion' in f.name %}
-                        <b>{{ f.label }}</b>
-                    {% else %}
-                        {{ f.label }}
-                    {% endif %}
-                </label>{% endif %}
-            </th>
-
-            <td>{{ f.as_widget }}</td>
-        </tr>
-
-        <tr><td></td><td>{{ f.help_text }}</td></tr>
-
-    {% endfor %}
-
-    <tr><td></td><td></td></tr>
-	<tr><td></td><td><input type="submit" value="Submit" onclick='js_single_submit()'></td></tr>
-    <tr><td></td><td><input type="hidden" name='request_token' value="{{ request_token }}"></td></tr>
-
-    </table>
-
-</form>
-
-{{ notes }}
+</div>