diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/expenses/add.jinja | 2 | ||||
-rw-r--r-- | templates/login/login.jinja | 2 | ||||
-rw-r--r-- | templates/macros.jinja | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/expenses/add.jinja b/templates/expenses/add.jinja index d63f844..0941c3a 100644 --- a/templates/expenses/add.jinja +++ b/templates/expenses/add.jinja @@ -19,7 +19,7 @@ {% block content %} <form name="add_expense" method="post"> - {{ render_form(form) }} + {{ render_form(form, expense = {'autofocus' : True}) }} <input type="submit" name="changeB"> </form> {% endblock %} diff --git a/templates/login/login.jinja b/templates/login/login.jinja index 3254fd6..0b2813c 100644 --- a/templates/login/login.jinja +++ b/templates/login/login.jinja @@ -7,7 +7,7 @@ {% block content %} <form name="login" method="post"> - {{ render_form(form) }} + {{ render_form(form, username = {'autofocus' : True}) }} <input type="submit"> </form> {% endblock %} diff --git a/templates/macros.jinja b/templates/macros.jinja index 454251d..d7cd2fc 100644 --- a/templates/macros.jinja +++ b/templates/macros.jinja @@ -31,7 +31,7 @@ {% macro render_form(form) %} <table> {% for field in form if not field is hidden %} - <tr><th>{{ field.label }}</th><td>{{ field }}</td><td>{{ field.description }}</td> + <tr><th>{{ field.label }}</th><td>{{ field(**kwargs.get(field.short_name, {})) }}</td><td>{{ field.description }}</td> <td>{% if field.errors %}<span class="error">{{ field.errors[0] }}</span>{% endif %}</td></tr> {% endfor %} </table> |