summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/general_form.html24
-rw-r--r--templates/todolists/add.html25
2 files changed, 24 insertions, 25 deletions
diff --git a/templates/general_form.html b/templates/general_form.html
new file mode 100644
index 0000000..4c17481
--- /dev/null
+++ b/templates/general_form.html
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <div class="greybox">
+ <h2 class="title">{{title}}</h2>
+ <form method="post" action=".">
+ <table>
+ {% for field in form %}
+ <tr>
+ <td style="vertical-align:top">
+ <span {% if field.required %}style="fontweight: bold"{% endif%}>{{field.label}}:</span>
+ <br /><span style="font-size:x-small">{{field.help_text}}</span></td>
+ <td>{{field}}</td>
+ </tr>
+ {% endfor %}
+ <tr>
+ <td colspan="2" style="text-align:right">
+ <input type="submit" value=" {{submit_text}} " />
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/todolists/add.html b/templates/todolists/add.html
deleted file mode 100644
index a53637c..0000000
--- a/templates/todolists/add.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
- <div class="greybox">
- <h2 class="title">Add ToDo List</h2>
- <form method="post" action=".">
- <table>
- <tr>
- <td>Name:</td>
- <td><input type="text" name="name" size="30" value="" /></td>
- </tr><tr>
- <td style="vertical-align:top">Description:</td>
- <td><textarea name="description" cols="60" rows="4"></textarea></td>
- </tr><tr>
- <td style="vertical-align:top">List of Package Names:<br /><span style="font-size:x-small">(one per line)</span></td>
- <td><textarea name="packages" cols="60" rows="20"></textarea></td>
- </tr><tr>
- <td colspan="2" style="text-align:right">
- <input type="submit" value=" Create List " />
- </td>
- </tr>
- </table>
- </form>
- </div>
-{% endblock %}