From 7008f9fc77385fcb25e3ae704d0548216c83805e Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 14 Jun 2011 17:46:19 +0200 Subject: tabbed edit --- templates/apps/name/edit.html | 13 ++--------- templates/edit_fieldsets_tabs.html | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 templates/edit_fieldsets_tabs.html (limited to 'templates') diff --git a/templates/apps/name/edit.html b/templates/apps/name/edit.html index d963048..80177c1 100644 --- a/templates/apps/name/edit.html +++ b/templates/apps/name/edit.html @@ -1,15 +1,6 @@ -{% extends "edit_fieldsets.html" %} +{% extends "edit_fieldsets_tabs.html" %} {% block widgets %} $('#id_expires').datepicker({'dateFormat': 'yy-mm-dd','timeFormat': 'hh:ii:ss'}); $('#id_description').wysiwyg(); - $('#wizard').formwizard({ - validationEnabled: true, - focusFirstInput: true, - textSubmit: "Finish", - validationOptions: { - rules: { - short: 'required' - } - } - }); + $('#tabs').tabs(); {% endblock %} \ No newline at end of file diff --git a/templates/edit_fieldsets_tabs.html b/templates/edit_fieldsets_tabs.html new file mode 100644 index 0000000..04f7a69 --- /dev/null +++ b/templates/edit_fieldsets_tabs.html @@ -0,0 +1,45 @@ +{% extends "tree.html" %} +{% block widgets %}{% endblock %} +{% block content %} + {% block beforeform %} + {% endblock %} +

{{formtitle}}

+ +
+ {% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %} +
+ + {% for fieldset in form.fieldsets %} +
+ {% if fieldset.description %} +

{{ fieldset.description }}

+ {% endif %} +
    + {% for field in fieldset %} + {% if field.is_hidden %} + {{ field }} + {% else %} +
  • + {{ field.errors }} + +
    {{ field }}
    +
  • + {% endif %} + {% endfor %} +
+
+ {% endfor %} +
+ +
+{% endblock %} \ No newline at end of file -- cgit v1.1