diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/apps/name/edit.html | 13 | ||||
-rw-r--r-- | templates/edit_fieldsets_tabs.html | 45 |
2 files changed, 47 insertions, 11 deletions
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 %} + <h2>{{formtitle}}</h2> + + <form method="POST"> + {% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %} + <div id="tabs"> + <ul> + {% for fieldset in form.fieldsets %} + <li><a href="#{{fieldset.name}}">{{fieldset.legend}}</a></li> + {% endfor %} + </ul> + {% for fieldset in form.fieldsets %} + <div class="fieldset" id="{{fieldset.name}}"> + {% if fieldset.description %} + <p class="description">{{ fieldset.description }}</p> + {% endif %} + <ul class="inputs"> + {% for field in fieldset %} + {% if field.is_hidden %} + {{ field }} + {% else %} + <li class="inputs {% if field.field.required %}required{% endif %}" {{ field.row_attrs }}> + {{ field.errors }} + <label for="id_{{ field.html_name }}" class="fieldlabel">{{ field.label }} + {% if field.field.required %}<b>*</b>{% endif %}</label> + <div class="fieldinput">{{ field }}</div> + </li> + {% endif %} + {% endfor %} + </ul> + </div> + {% endfor %} + </div> + <ul class="ilist" style="padding-bottom: 30px; padding-top: 10px; padding-left: 0px;"> + <li class="button left"><input type="submit" value="Update"/></li> + {% if name %} + <li class="button right"><input type="button" onClick="document.location='{{name.url}}'" value="Cancel"/></li> + {% endif %} + </ul> + </form> +{% endblock %}
\ No newline at end of file |