--- a/app/templates/projrev/proposal/review.html Wed Aug 12 19:30:12 2009 +0530
+++ b/app/templates/projrev/proposal/review.html Wed Aug 12 22:41:21 2009 +0530
@@ -1,15 +1,6 @@
{% extends "projrev/base.html" %}
{% load review_helpers %}
-{% block scripts %}
-{{ block.super }}
-<script type="text/javascript">
-$(document).ready(function () {
- alert($('#attribute1[value=1]').attr('checked', 'checked'));
-});
-</script>
-{% endblock scripts %}
-
{% block content %}
<div class="post">
@@ -97,11 +88,7 @@
<p>
{{ form.attribute1.errors }}
<strong>{{ form.attribute1.label }}</strong><br />
- <input name="attribute1" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute1" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute1" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute1" type="radio" class="star" title="Very Good" value="4" />
- <input name="attribute1" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute1" %}
{% if form.attribute1.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -111,11 +98,7 @@
<p>
{{ form.attribute2.errors }}
<strong>{{ form.attribute2.label }}</strong><br />
- <input name="attribute2" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute2" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute2" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute2" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute2" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute2" %}
{% if form.attribute2.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -125,11 +108,7 @@
<p>
{{ form.attribute3.errors }}
<strong>{{ form.attribute3.label }}</strong><br />
- <input name="attribute3" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute3" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute3" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute3" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute3" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute3" %}
{% if form.attribute3.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -139,11 +118,7 @@
<p>
{{ form.attribute4.errors }}
<strong>{{ form.attribute4.label }}</strong><br />
- <input name="attribute4" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute4" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute4" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute4" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute4" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute4" %}
{% if form.attribute4.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -153,11 +128,7 @@
<p>
{{ form.attribute5.errors }}
<strong>{{ form.attribute5.label }}</strong><br />
- <input name="attribute5" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute5" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute5" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute5" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute5" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute5" %}
{% if form.attribute5.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -167,11 +138,7 @@
<p>
{{ form.attribute6.errors }}
<strong>{{ form.attribute6.label }}</strong><br />
- <input name="attribute6" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute6" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute6" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute6" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute6" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute6" %}
{% if form.attribute6.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -181,11 +148,7 @@
<p>
{{ form.attribute7.errors }}
<strong>{{ form.attribute7.label }}</strong><br />
- <input name="attribute7" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute7" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute7" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute7" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute7" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute7" %}
{% if form.attribute7.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -195,11 +158,7 @@
<p>
{{ form.attribute8.errors }}
<strong>{{ form.attribute8.label }}</strong><br />
- <input name="attribute8" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute8" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute8" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute8" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute8" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute8" %}
{% if form.attribute8.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>
@@ -209,11 +168,7 @@
<p>
{{ form.attribute9.errors }}
<strong>{{ form.attribute9.label }}</strong><br />
- <input name="attribute9" type="radio" class="star" title="Poor" value="1"/>
- <input name="attribute9" type="radio" class="star" title="Average" value="2"/>
- <input name="attribute9" type="radio" class="star" title="Good" value="3"/>
- <input name="attribute9" type="radio" class="star" title="Very Good" value="4"/>
- <input name="attribute9" type="radio" class="star" title="Excellent" value="5"/>
+ {% as_star_for_score "attribute9" %}
{% if form.attribute9.field.required %}<span class="specialclass"> (required)</span>{% endif %}
</p>
<p>