cleaned up code and integrated some simple CSS
[rapidsms] / templates / edit_questions.tmpl
1 {% extends 'layout.tmpl' %}
2
3 {% block content %}
4 <h2>List of Questions for {{questionaire.description}}</h2>
5
6
7 <table>
8 <tr>
9 <th>Code</th>
10 <th>Long Description</th>
11 <th>Short Description</th>
12 <th>Data Type</th>
13 </tr>
14
15 {% for q in questionaire.questions %}
16 <tr>
17 <td>{{q.code}}</td>
18 <td>{{q.longdesc}}</td>
19 <td>{{q.shortdesc}}</td>
20 <td>{{q.datatype}}</td>
21 </tr>
22 {% endfor %}
23 </table>
24
25 <h2>New Question</h2>
26
27 <form method="POST"
28       action="{{homepath}}/edit_questions/{{questionaire.id}}">
29
30 <p><label for="shortdesc">Short Description</label>
31 <input name="shortdesc" type="text" size="15" value="{{shortdesc}}"  /></p>
32
33 <p><label for="longdesc">Long Description</label>
34 <input name="longdesc" type="text" size="50" value="{{longdesc}}"  /></p>
35
36 <p><label for="datatype">Data Type</lable>
37 <select name="datatype">
38 <option value="number" />Number
39 <option value="word" />Word
40 <option value="bool" />Yes/No
41 </select></p>
42
43 <input type="submit" value="Save" />
44 </form>
45
46 {% endblock %}

Benjamin Mako Hill || Want to submit a patch?