summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2013-04-14 18:54:50 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2013-04-14 18:54:50 +0200
commit21c591327c8c4c8bbf34831a23f4439fec32f3b2 (patch)
tree68754e3f4726d31c7a61a472fa17109a5b316295 /templates
parentabfc1005db0f256ca60823f61b8a904304eb9a4c (diff)
downloadkosten-21c591327c8c4c8bbf34831a23f4439fec32f3b2.tar.gz
kosten-21c591327c8c4c8bbf34831a23f4439fec32f3b2.tar.bz2
kosten-21c591327c8c4c8bbf34831a23f4439fec32f3b2.zip
Add expense -- in Flask
Diffstat (limited to 'templates')
-rw-r--r--templates/pages/add.jinja31
-rw-r--r--templates/pages/add.mako27
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>