]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/osqaadmin/set.html
Merge pull request #26 from udacity/remove_dj_version
[osqa.git] / forum / skins / default / templates / osqaadmin / set.html
index 2a3b26facfd7e01167b49912134537b2b6c0ea6c..1ff3525e8e8e5cdde9f209b0e3c2bffed7b097c2 100644 (file)
@@ -1,21 +1,28 @@
-{% extends "osqaadmin/base.html" %}\r
-\r
-{% load i18n %}\r
-{% load extra_tags %}\r
-\r
-{% block subtitle %}{{ form.set.title }}{% endblock %}\r
-{% block description %}{{ form.set.description }}{% endblock %}\r
-\r
-{% block admincontent %}\r
-    <form action="" method="POST" enctype="multipart/form-data">\r
-        <table id="admin_form">\r
-            {{ form.as_table }}\r
-            <tr>\r
-                <th></th>\r
-                <td>\r
-                    <input id="submit" name="submit" type="submit" value="Save" />\r
-                </td>\r
-            </tr>\r
-        </table>\r
-    </form>\r
+{% extends basetemplate %}
+
+{% load i18n extra_tags extra_filters %}
+
+{% block subtitle %}{{ form.set.title }}{% endblock %}
+{% block pagename %}{{ form.set.title }}{% endblock %}
+{% block description %}{{ form.set.description }}{% endblock %}
+
+{% block admincontent %}
+    <form action="" method="POST" enctype="multipart/form-data" accept-charset="utf-8">
+        {% csrf_token %}
+        <table id="admin_form" style="width: 100%">
+            {{ form.as_table }}
+            <tr>
+                <th></th>
+                <td>
+                    <input id="submit" name="submit" type="submit" value="{% trans "Save" %}" onclick="this.form.target=''; return true;" />
+                    {% if form.set.can_preview %}
+                        <input id="preview" name="preview" type="submit" value="{% trans "Preview" %}" onclick="this.form.target='_blank'; return true;" />
+                        {% if form.set.name|contained_in:unsaved %}
+                            <input id="reset" name="reset" type="submit" value="{% trans "Reset Changes" %}" onclick="this.form.target=''; return true;" />
+                        {% endif %}
+                    {% endif %}
+                </td>
+            </tr>
+        </table>
+    </form>
 {% endblock %}
\ No newline at end of file