app/templates/projrev/proposal/review.html
changeset 28 be65e84e7d03
parent 27 37612f295cd4
child 29 425626c7f63e
--- a/app/templates/projrev/proposal/review.html	Mon Aug 10 01:38:02 2009 +0530
+++ b/app/templates/projrev/proposal/review.html	Mon Aug 10 02:13:02 2009 +0530
@@ -52,9 +52,74 @@
       <a href="/site-content/{{ proposal_path }}">{{ proposal_name }}</a>
     </div>
   </div>
+
+
 	<form enctype="multipart/form-data" method="post" action="">			
 		<p>
-      {{ form.as_p }}
+      <p>
+      {% if form.comment.help_text %}
+        <script type="text/javascript">
+          $(document).ready( function() {
+            var tooltip = [
+            "<div class='tooltip'>",
+            "  <div class='tooltip-body'>",
+            "    <img src='/site-content/images/info.png' alt='' />",
+            "    <h3>Info</h3>",
+            "    <p>",
+            "      {% autoescape off %}",
+            "        {{ form.comment.help_text|linebreaksbr|escapejs }}",
+            "      {% endautoescape %}",
+            "    </p>",
+            "  </div>",
+            "  <div class='tooltip-bottom'></div>",
+            "</div>"
+            ].join("");
+
+            var tooltip_object=null;
+            var documented = $("#id_{{ form.comment.name }}");
+            var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
+            if (not_fieldset) {
+              documented.focus(function() {
+                if (tooltip_object==null) {
+                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
+                }
+              });
+              documented.blur(function() {
+                if (tooltip_object!==null) {
+                  tooltip_object.remove();
+                  tooltip_object=null;
+                }
+              });
+            }
+            else {
+              documented.find("input").hover(function() {
+                if (tooltip_object==null) {
+                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
+                }
+              },
+              function() {
+                if (tooltip_object!==null) {
+                  tooltip_object.remove();
+                  tooltip_object=null;
+                }
+              });
+            }
+          });
+        </script>
+      {% endif %}
+      {{ form.comment.errors }}
+      {{ form.comment.label_tag }}{{ form.comment }}{% if form.comment.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
+      <p>
+        {{ form.comment.errors }}
+        {{ form.attribute1.label_tag }}:
+        <input name="attribute1" type="radio" class="star"/>
+        <input name="attribute1" type="radio" class="star"/>
+        <input name="attribute1" type="radio" class="star"/>
+        <input name="attribute1" type="radio" class="star"/>
+        <input name="attribute1" type="radio" class="star"/> 
+        {% if form.attribute1.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
+      </p>
 		<br />	
 		<input class="button" type="submit" value="Submit Review" />		
 		</p>