diff options
author | Leif Johansson <leifj@sunet.se> | 2011-02-28 22:07:19 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-02-28 22:07:19 +0100 |
commit | 77ceee6e23f2a8daaf5e3247970953313aebcdd3 (patch) | |
tree | 90665ac16c025ea1bc7b478f2c84dcebf437f393 /templates | |
parent | 36e045ed8aa871ef3bd0bf0e27896658d0a9ef89 (diff) |
wizards
Diffstat (limited to 'templates')
-rw-r--r-- | templates/apps/invitation/edit.html | 10 | ||||
-rw-r--r-- | templates/apps/membership/edit.html | 9 | ||||
-rw-r--r-- | templates/apps/name/add.html | 10 | ||||
-rw-r--r-- | templates/apps/name/delete.html | 8 | ||||
-rw-r--r-- | templates/apps/name/edit.html | 11 | ||||
-rw-r--r-- | templates/base.html | 14 | ||||
-rw-r--r-- | templates/edit.html | 2 | ||||
-rw-r--r-- | templates/edit_fieldsets.html | 41 | ||||
-rw-r--r-- | templates/tree.html | 2 |
9 files changed, 97 insertions, 10 deletions
diff --git a/templates/apps/invitation/edit.html b/templates/apps/invitation/edit.html index ab833ad..28fc447 100644 --- a/templates/apps/invitation/edit.html +++ b/templates/apps/invitation/edit.html @@ -1 +1,9 @@ -{% extends "edit.html" %}
\ No newline at end of file +{% extends "edit_fieldsets.html" %} +{% block widgets %} + $('#id_expires').datepicker({'dateFormat': 'yy-mm-dd','timeFormat': 'hh:ii:ss'}); + $('#form').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish" + }); +{% endblock %}
\ No newline at end of file diff --git a/templates/apps/membership/edit.html b/templates/apps/membership/edit.html index ab833ad..e9074b0 100644 --- a/templates/apps/membership/edit.html +++ b/templates/apps/membership/edit.html @@ -1 +1,8 @@ -{% extends "edit.html" %}
\ No newline at end of file +{% extends "edit_fieldsets.html" %} +{% block widgets %} + $('#form').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish" + }); +{% endblock %}
\ No newline at end of file diff --git a/templates/apps/name/add.html b/templates/apps/name/add.html new file mode 100644 index 0000000..aba49ad --- /dev/null +++ b/templates/apps/name/add.html @@ -0,0 +1,10 @@ +{% extends "edit_fieldsets.html" %} +{% block widgets %} + $('#id_expires').datepicker({'dateFormat': 'yy-mm-dd','timeFormat': 'hh:ii:ss'}); + $('#id_description').wysiwyg(); + $('#form').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish" + }); +{% endblock %}
\ No newline at end of file diff --git a/templates/apps/name/delete.html b/templates/apps/name/delete.html new file mode 100644 index 0000000..e9074b0 --- /dev/null +++ b/templates/apps/name/delete.html @@ -0,0 +1,8 @@ +{% extends "edit_fieldsets.html" %} +{% block widgets %} + $('#form').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish" + }); +{% endblock %}
\ No newline at end of file diff --git a/templates/apps/name/edit.html b/templates/apps/name/edit.html index ab833ad..aba49ad 100644 --- a/templates/apps/name/edit.html +++ b/templates/apps/name/edit.html @@ -1 +1,10 @@ -{% extends "edit.html" %}
\ No newline at end of file +{% extends "edit_fieldsets.html" %} +{% block widgets %} + $('#id_expires').datepicker({'dateFormat': 'yy-mm-dd','timeFormat': 'hh:ii:ss'}); + $('#id_description').wysiwyg(); + $('#form').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "Finish" + }); +{% endblock %}
\ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 742e5ab..d0f22ea 100644 --- a/templates/base.html +++ b/templates/base.html @@ -17,9 +17,13 @@ <script type="text/javascript" src="/site-media/js/jquery.cookie.js"></script> <script type="text/javascript" src="/site-media/js/jquery.timers.js"></script> <script type="text/javascript" src="/site-media/js/jquery.tagInput.js"></script> - <script type="text/javascript" src="/site-media/js/jquery.multiselect2side.js"></script> + <!-- script type="text/javascript" src="/site-media/js/jquery.multiselect2side.js"></script --> <script type="text/javascript" src="/site-media/js/jquery.jstree.js"></script> <script type="text/javascript" src="/site-media/js/jquery.wysiwyg.js"></script> + <script type="text/javascript" src="/site-media/js/bbq.js"></script> + <script type="text/javascript" src="/site-media/js/jquery.validate.js"></script> + <script type="text/javascript" src="/site-media/js/jquery.form.js"></script> + <script type="text/javascript" src="/site-media/js/jquery.form.wizard-3.0.4.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>{% block title %}{% endblock %}</title> <script type="text/javascript"> @@ -38,7 +42,7 @@ }); } $(function() { - $("input:submit, input:button, a",".button").button(); + $("input:submit, input:reset, input:button, a",".button").button(); $('#notification').jnotifyInizialize({ oneAtTime: false, appendType: 'append' @@ -63,6 +67,9 @@ {% if name %} <div style="float: left;" class="navlist toolbar"> <ul> + {% if render.add %} + <li class="button"><a href="/name/{{name.id}}/add">Add Group</a></li> + {% endif %} <li class="button"><a class="tip" title="This is the full name of the group. This is the name that will be exposed to applications." href="{{name.url}}">{{ name }}</a></li> </ul> </div> @@ -77,9 +84,6 @@ {% if name %} <div class="navlist toolbar"> <ul> - {% if render.add %} - <li class="button"><a href="/name/{{name.id}}/add">New Group</a></li> - {% endif %} {% if render.acl %} <li class="button"><a href="/name/{{name.id}}/link/0">Modify Access</a></li> {% endif %} diff --git a/templates/edit.html b/templates/edit.html index aa6d088..337264d 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -6,7 +6,7 @@ {% block content %} {% block beforeform %} {% endblock %} - <form method="POST"> + <form method="POST" class="ui-helper-reset ui-widget-contents ui-corner-all"> <div class="infopanel"> <h1>{{formtitle}}</h1> <table class="formtable"> diff --git a/templates/edit_fieldsets.html b/templates/edit_fieldsets.html new file mode 100644 index 0000000..75885d7 --- /dev/null +++ b/templates/edit_fieldsets.html @@ -0,0 +1,41 @@ +{% extends "tree.html" %} +{% block widgets %}{% endblock %} +{% block content %} + {% block beforeform %} + {% endblock %} + <form method="POST" id="form"> + <div class="infopanel"> + <h1>{{formtitle}}</h1> + {% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %} + {% for fieldset in form.fieldsets %} + <fieldset id="{{fieldset.name}}" class="{{ fieldset.classes }}"> + {% if fieldset.legend %} + <legend class="ui-state-highlight ui-corner-all">{{ fieldset.legend }}</legend> + {% endif %} + {% if fieldset.description %} + <p>{{ fieldset.description }}</p> + {% endif %} + <ul class="links"> + {% for field in fieldset %} + {% if field.is_hidden %} + {{ field }} + {% else %} + <li class="links" {{ field.row_attrs }}> + {{ field.errors }} + {{ field.label_tag }} + {{ field }} + </li> + {% endif %} + {% endfor %} + </ul> + </fieldset> + {% endfor %} + </div> + <br/> + <div class="button"> + <input type="reset" value="Back"/> + <input type="submit" value="Finish" /> + <input type="button" style="float: right;" onClick="document.location='{{name.url}}'" value="Cancel"/> + </div> + </form> +{% endblock %}
\ No newline at end of file diff --git a/templates/tree.html b/templates/tree.html index 770b41f..eed61e4 100644 --- a/templates/tree.html +++ b/templates/tree.html @@ -14,7 +14,7 @@ $(function() { } } }, - "progressive_render" : true, + "progressive_render" : true }, 'themes': { 'theme': 'classic' |