diff options
| author | Arnaud Bos <arnaud.tlse@gmail.com> | 2011-09-11 05:25:42 +0200 |
|---|---|---|
| committer | Arnaud Bos <arnaud.tlse@gmail.com> | 2011-09-11 05:30:28 +0200 |
| commit | 88cd2f86751621d73574ac56a9d6c4bedcbdd3d5 (patch) | |
| tree | 14a232f3be23e5785c3b9b37e6d05fbed8d0907f /budget/templates/forms.html | |
| parent | f48fc22335f1011bcf376a4f266a35a888f47b2e (diff) | |
| download | ihatemoney-mirror-88cd2f86751621d73574ac56a9d6c4bedcbdd3d5.zip ihatemoney-mirror-88cd2f86751621d73574ac56a9d6c4bedcbdd3d5.tar.gz ihatemoney-mirror-88cd2f86751621d73574ac56a9d6c4bedcbdd3d5.tar.bz2 | |
Fix #24 on Authentication and New project forms usability.
- Do not display anymore the identifier field in home.
- Let the user enter the id if the slug generated from project name already exists as a project id.
- Moved get_billform_for from 'utils' to 'forms', to avoid issue (was 'from forms import ...' into utils,
and 'from utils import ...' into forms, which causeed an error).
Diffstat (limited to 'budget/templates/forms.html')
| -rw-r--r-- | budget/templates/forms.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/budget/templates/forms.html b/budget/templates/forms.html index b027763..ba915e8 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -17,8 +17,11 @@ </div> <!-- /clearfix --> {% endmacro %} -{% macro submit(field, cancel=False) -%} +{% macro submit(field, cancel=False, home=False) -%} <div class="actions"> + {% if home %} + <a href="{{ url_for(".home") }}" class="btn">Back Home</a> + {% endif %} <button type="submit" class="btn primary">{{ field.name }}</button> {% if cancel %} <button id="cancel-form" type="reset" class="btn">Cancel</button> @@ -42,12 +45,14 @@ {% include "display_errors.html" %} {{ form.hidden_tag() }} - {{ input(form.name) }} + {% if not home %} {{ input(form.id) }} + {% endif %} + {{ input(form.name) }} {{ input(form.password) }} {{ input(form.contact_email) }} {% if not home %} - {{ submit(form.submit) }} + {{ submit(form.submit, home=True) }} {% endif %} {% endmacro %} |
