diff options
author | Leif Johansson <leifj@sunet.se> | 2011-04-04 21:05:39 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-04-04 21:05:39 +0200 |
commit | 15077ed4277b38f9e2eb9f9b1550b664a0bb1e28 (patch) | |
tree | 95d7294b10f992c5ebd736a3a57ed929ad97253f /src/templates | |
parent | 5e6d967b1bf14b715b306d8bc7637f94a813757b (diff) |
cleanup and turn form into wizard
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/apps/room/create.html | 8 | ||||
-rw-r--r-- | src/templates/apps/room/modify.html | 14 | ||||
-rw-r--r-- | src/templates/apps/room/update.html | 8 | ||||
-rw-r--r-- | src/templates/form.html | 39 |
4 files changed, 69 insertions, 0 deletions
diff --git a/src/templates/apps/room/create.html b/src/templates/apps/room/create.html new file mode 100644 index 0000000..7989856 --- /dev/null +++ b/src/templates/apps/room/create.html @@ -0,0 +1,8 @@ +{% extends "apps/room/modify.html" %} +{% block beforeform %} +<div class="ui-state-highlight ui-corner-all" style="margin-bottom: 5px;"> +<p class="infopanel"> +<span class="ui-icon ui-icon-info"></span> +Here you can create a new meeting room... +</p></div> +{% endblock %}
\ No newline at end of file diff --git a/src/templates/apps/room/modify.html b/src/templates/apps/room/modify.html new file mode 100644 index 0000000..e76d01f --- /dev/null +++ b/src/templates/apps/room/modify.html @@ -0,0 +1,14 @@ +{% extends "form.html" %} +{% block widgets %} + $('#wizard').formwizard({ + validationEnabled: true, + focusFirstInput: true, + textSubmit: "{{submitname}}", + validationOptions: { + rules: { + name: 'required', + urlpath: 'required' + } + } + }); +{% endblock %}
\ No newline at end of file diff --git a/src/templates/apps/room/update.html b/src/templates/apps/room/update.html new file mode 100644 index 0000000..3e5c4fa --- /dev/null +++ b/src/templates/apps/room/update.html @@ -0,0 +1,8 @@ +{% extends "apps/room/modify.html" %} +{% block beforeform %} +<div class="ui-state-highlight ui-corner-all" style="margin-bottom: 5px;"> +<p class="infopanel"> +<span class="ui-icon ui-icon-info"></span> +Here you can update an existing meeting room... +</p></div> +{% endblock %}
\ No newline at end of file diff --git a/src/templates/form.html b/src/templates/form.html new file mode 100644 index 0000000..682ece7 --- /dev/null +++ b/src/templates/form.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} +{% load prefix %} +{% block content %} + <h1>{% block formtitle %}{{formtitle}}{% endblock %}</h1> + {% block beforeform %}{% endblock %} + <form method="POST" id="wizard" enctype="multipart/form-data" class="bbq infopanel"> + {% 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 class="description" style="border-bottom: 1px solid #CECECE; padding-bottom: 5px;">{{ fieldset.description }}</p> + {% endif %} + <ul class="links"> + {% for field in fieldset %} + {% if field.is_hidden %} + {{ field }} + {% else %} + <li class="links {% 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> + </fieldset> + {% endfor %} + <ul class="ilist" style="padding-top: 10px; padding-bottom: 5px;"> + <li class="button left"><input type="reset" value="Back"/></li> + <li class="button left"><input type="submit" value="Finish"/></li> + <li class="button right"><input type="button" onClick="document.location='/room'" value="Cancel"/></li> + </ul> + <div class="clear"></div> + </form> +{% endblock %} |