summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorPrimal Pappachan2012-03-19 00:02:04 +0530
committerPrimal Pappachan2012-03-19 00:02:04 +0530
commit6bf4281d493fe800451cb818d09686b7e6ce767e (patch)
treed1fc0ad16f8311128e76467e3cbbfccf0d85f37f /template
parent2c97aecefd592649e88f5ace6ed39ef98f93089d (diff)
downloadaloha-6bf4281d493fe800451cb818d09686b7e6ce767e.tar.gz
aloha-6bf4281d493fe800451cb818d09686b7e6ce767e.tar.bz2
aloha-6bf4281d493fe800451cb818d09686b7e6ce767e.zip
Initial working version of option choosing and saving in database
Diffstat (limited to 'template')
-rw-r--r--template/allotter/apply.html13
1 files changed, 9 insertions, 4 deletions
diff --git a/template/allotter/apply.html b/template/allotter/apply.html
index ca03726..c38837a 100644
--- a/template/allotter/apply.html
+++ b/template/allotter/apply.html
@@ -39,21 +39,24 @@ options are available to you. Please rank your choices.</h4>
Listing the options for first test paper.
{% endcomment %}
-<form action="/allotter/save" method="post">
+{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
+
+<form action="/allotter/{{user.username}}/submit/" method="post">
{% csrf_token %}
{% for option in options_available_first %}
<p>{{ option.opt_name }}</p>
{% for i in oafl|get_range %}
- <input name="option" type="radio" value="{{i}}" />{{i}}<br/>
+ <input name="{{option.opt_name}}" type="radio" value="{{option.id}}" /><br/>
{% endfor %}
- <input name="option" type="radio" value="None" />None<br/>
+ <input name="{{option.opt_name}}" type="radio" value="None" />None<br/>
{% endfor %}
{% comment %}
Listing the options for second test paper if it exists.
{% endcomment %}
+{% comment %}
{% if np == 2 %}
{% for option in options_available_second %}
@@ -62,10 +65,12 @@ Listing the options for second test paper if it exists.
<input name="option" type="radio" value="{{i}}" />{{i}}<br/>
{% endfor %}
<input name="option" type="radio" value="None" />None<br/>
-{% endfor %}
+{% endfor %}
{% endif %}
+{% endcomment %}
+
<input type="submit" name="save" value="Save" />
</form>