author | Madhusudan.C.S <madhusudancs@gmail.com> |
Thu, 13 Aug 2009 04:27:08 +0530 | |
changeset 48 | 9bdb5a00689a |
parent 38 | 3cb38edbe05f |
permissions | -rw-r--r-- |
0 | 1 |
{% extends "projrev/base.html" %} |
22 | 2 |
{% block scripts %} |
3 |
{{ block.super }} |
|
4 |
<script language="JavaScript" type="text/javascript" src="/site-content/js/jquery.chainedSelects.js"></script> |
|
5 |
<script language="JavaScript" type="text/javascript"> |
|
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
6 |
$(function() |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
7 |
{ |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
8 |
$('#id_state').chainSelect('#id_district','/proposal/submit/get_dfors'); |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
9 |
}); |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
10 |
$(document).ready(function() { |
38 | 11 |
dt_val = $('#id_district').val(); |
12 |
$.getJSON('/proposal/submit/get_new_dfors', |
|
13 |
{ '_value': $('#id_state').val() }, |
|
14 |
function(data) { |
|
15 |
var option_html = ""; |
|
16 |
for (i in data) { |
|
17 |
if (data[i]) { |
|
18 |
for (key in data[i]) { |
|
19 |
if (key == dt_val) { |
|
20 |
option_html += '<option selected="selected" value="'+ key +'">'+ data[i][key] +'</option>'; |
|
21 |
} else { |
|
22 |
option_html += '<option value="'+ key +'">'+ data[i][key] +'</option>'; |
|
23 |
} |
|
24 |
} |
|
25 |
} |
|
26 |
} |
|
27 |
$('#id_district').html(option_html); |
|
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
28 |
}); |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
29 |
}); |
22 | 30 |
</script> |
31 |
{% endblock scripts %} |
|
0 | 32 |
{% block content %} |
33 |
<div class="post"> |
|
34 |
||
35 |
<a name="TemplateInfo"></a> |
|
36 |
<h1>Submit your proposal</h1> |
|
4
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
37 |
|
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
38 |
{% if created_now %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
39 |
<p>An MICR Code has been assigned and e-mailed to you. Please remember it for future reference.</p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
40 |
{% else %}{% if micr_code %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
41 |
<p>Edit your details and upload new version of the proposal in the form below.</p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
42 |
{% else %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
43 |
<p>Fill up the form below, and upload your proposal file by clicking on Browse.</p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
44 |
{% endif %}{% endif %} |
0 | 45 |
|
46 |
<form enctype="multipart/form-data" method="post" action=""> |
|
47 |
<p> |
|
22 | 48 |
{% for field in form %} |
49 |
<p> |
|
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
50 |
{% if field.help_text %} |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
51 |
<script type="text/javascript"> |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
52 |
$(document).ready( function() { |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
53 |
var tooltip = [ |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
54 |
"<div class='tooltip'>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
55 |
" <div class='tooltip-body'>", |
24
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
56 |
" <img src='/site-content/images/info.png' alt='' />", |
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
57 |
" <h3>Info</h3>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
58 |
" <p>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
59 |
" {% autoescape off %}", |
24
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
60 |
" {{ field.help_text|linebreaksbr|escapejs }}", |
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
61 |
" {% endautoescape %}", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
62 |
" </p>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
63 |
" </div>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
64 |
" <div class='tooltip-bottom'></div>", |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
65 |
"</div>" |
24
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
66 |
].join(""); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
67 |
|
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
68 |
var tooltip_object=null; |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
69 |
var documented = $("#id_{{ field.name }}"); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
70 |
var not_fieldset = documented.attr('tagName') !== 'FIELDSET'; |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
71 |
if (not_fieldset) { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
72 |
documented.focus(function() { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
73 |
if (tooltip_object==null) { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
74 |
tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000}); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
75 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
76 |
}); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
77 |
documented.blur(function() { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
78 |
if (tooltip_object!==null) { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
79 |
tooltip_object.remove(); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
80 |
tooltip_object=null; |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
81 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
82 |
}); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
83 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
84 |
else { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
85 |
documented.find("input").hover(function() { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
86 |
if (tooltip_object==null) { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
87 |
tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000}); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
88 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
89 |
}, |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
90 |
function() { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
91 |
if (tooltip_object!==null) { |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
92 |
tooltip_object.remove(); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
93 |
tooltip_object=null; |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
94 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
95 |
}); |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
96 |
} |
7257b66a6766
Purr implemented for submit form.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
97 |
}); |
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
98 |
</script> |
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
99 |
{% endif %} |
22 | 100 |
{{ field.errors }} |
23
91cf6872d853
Add jqeury purr plugin for help text.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
22
diff
changeset
|
101 |
{{ field.label_tag }}:{{ field }}{% if field.field.required %}<span class="special_class"> (required)</span>{% endif %} |
22 | 102 |
</p> |
103 |
{% endfor %} |
|
104 |
||
4
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
105 |
{% if proposal_path %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
106 |
<p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
107 |
<label for="id_proposal">Previous Proposal Document:</label> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
108 |
<a class="document-right" href="/site-content/{{ proposal_path }}">{{ proposal_name }}</a> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
109 |
</p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
110 |
{% endif %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
111 |
{% if micr_code %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
112 |
<p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
113 |
<label for="id_micr_code">MICR Code:</label> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
114 |
<input id="id_micr_code" type="text" maxlength="15" value="{{ micr_code }}" name="institution" DISABLED /> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
115 |
</p> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
116 |
{% endif %} |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
117 |
<br /> |
8d9da911ed7d
Withdraw of proposals.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
0
diff
changeset
|
118 |
<input class="button" type="submit" value="Submit Proposal" /> |
0 | 119 |
</p> |
120 |
</form> |
|
121 |
||
13 | 122 |
<p class="post-footer align-right"> |
123 |
<span class="comments">Reviews: |
|
124 |
{% if nr_reviews %} |
|
125 |
{{ nr_reviews }} |
|
126 |
{% else %} |
|
127 |
(<i>None</i>) |
|
128 |
{% endif %} |
|
129 |
</span> |
|
130 |
<span class="date">Last reviewed: |
|
131 |
{% if last_reviewed %} |
|
14 | 132 |
{{ last_reviewed|date:"jS F Y h:iA" }} |
13 | 133 |
{% else %} |
134 |
(<i>Not Reviewed</i>) |
|
135 |
{% endif %} |
|
136 |
</span> |
|
137 |
<span class="date">Last submitted: |
|
138 |
{% if last_submitted %} |
|
14 | 139 |
{{ last_submitted|date:"jS F Y h:iA" }} |
13 | 140 |
{% else %} |
141 |
(<i>New Submission</i>) |
|
142 |
{% endif %} |
|
143 |
</span> |
|
0 | 144 |
</p> |
145 |
||
146 |
</div> |
|
147 |
{% endblock content %} |