diff options
Diffstat (limited to 'templates/pages')
-rw-r--r-- | templates/pages/add.jinja | 31 | ||||
-rw-r--r-- | templates/pages/add.mako | 27 |
2 files changed, 31 insertions, 27 deletions
diff --git a/templates/pages/add.jinja b/templates/pages/add.jinja new file mode 100644 index 0000000..3e3caa2 --- /dev/null +++ b/templates/pages/add.jinja @@ -0,0 +1,31 @@ +{% extends "page.jinja" %} + +{% block heading %} + Neue Ausgabe hinzufügen +{% endblock %} + +{% block js %} + {{ super() }} + <script type="text/javascript" src="{{ "jqueryui/jquery-ui-1.8.2.js" | static_url }}"></script> + <script type="text/javascript" src="{{ "js/add.js" | static_url }}"></script> +{% endblock %} + +{% block style %} + {{ super() }} + <link href="{{ "jqueryui/css/ui-darkness/jquery-ui-1.8.2.custom.css" | static_url }}" rel="stylesheet" type="text/css"> +{% endblock %} + +{% block content %} + <form name="add_expense" method="post"> + <table> + {% for field in form if not field is hidden %} + <tr><th>{{ field.label }}</th><td>{{ field }}</td><td>{{ field.description }}</td> + <td>{% if field.errors %}<span class="error">{{ field.errors[0] }}</span>{% endif %}</td></tr> + {% endfor %} + </table> + {{ form.hidden_tag() }} + {% block form_buttons %} + <input type="submit" name="changeB"> + {% endblock %} + </form> +{% endblock %} diff --git a/templates/pages/add.mako b/templates/pages/add.mako deleted file mode 100644 index 3ce46fd..0000000 --- a/templates/pages/add.mako +++ /dev/null @@ -1,27 +0,0 @@ -<%inherit file="/page.mako" /> - -% if not form.valid: - FEHLER! -% endif - -<form name="add_expense" method="post"> - ${form.render()} - <%block name="form_buttons"> - <input type="submit" name="changeB" /> - </%block> -</form> - -<%block name="heading"> - Neue Ausgabe hinzufügen -</%block> - -<%block name="js"> - ${parent.js()} - <script type="text/javascript" src=${"/static/jqueryui/jquery-ui-1.8.2.js" | url}></script> - <script type="text/javascript" src=${"/static/js/add.js" | url}></script> -</%block> - -<%block name="style"> - ${parent.style()} - <link href=${"/static/jqueryui/css/ui-darkness/jquery-ui-1.8.2.custom.css" | url} rel="stylesheet" type="text/css" /> -</%block> |