Commit 643f0cbd459e5ab6c3f359ee67a6de4cd23b0af0
1 parent
b577645c
Exists in
master
and in
1 other branch
style and valid form on thanks
Showing
2 changed files
with
75 additions
and
28 deletions
Show diff stats
src/web/static/css/survey.css
@@ -136,8 +136,9 @@ background: white; | @@ -136,8 +136,9 @@ background: white; | ||
136 | } | 136 | } |
137 | 137 | ||
138 | .radioButton { | 138 | .radioButton { |
139 | -border: 1px solid white; | ||
140 | -box-shadow: 0 1px 4px white inset; | 139 | +border: 1px solid transparent; |
140 | +box-shadow: none; | ||
141 | +background: none; | ||
141 | text-align: left; | 142 | text-align: left; |
142 | vertical-align: middle; | 143 | vertical-align: middle; |
143 | width: 150px; | 144 | width: 150px; |
@@ -154,6 +155,7 @@ z-index: 2; | @@ -154,6 +155,7 @@ z-index: 2; | ||
154 | cursor: pointer; | 155 | cursor: pointer; |
155 | } | 156 | } |
156 | 157 | ||
158 | +#optionalform, | ||
157 | #panel-controls { | 159 | #panel-controls { |
158 | position: relative; | 160 | position: relative; |
159 | width: 170px; | 161 | width: 170px; |
@@ -178,7 +180,7 @@ font-weight: bold; | @@ -178,7 +180,7 @@ font-weight: bold; | ||
178 | #next-button { | 180 | #next-button { |
179 | text-align: center; | 181 | text-align: center; |
180 | position: absolute; | 182 | position: absolute; |
181 | -top: 90px; | 183 | +top: 85px; |
182 | right: 70px; | 184 | right: 70px; |
183 | width: 80px; | 185 | width: 80px; |
184 | height: 20px; | 186 | height: 20px; |
@@ -197,10 +199,6 @@ height: 20px; | @@ -197,10 +199,6 @@ height: 20px; | ||
197 | z-index: 3; | 199 | z-index: 3; |
198 | } | 200 | } |
199 | 201 | ||
200 | -/* | ||
201 | - * Package Box | ||
202 | - */ | ||
203 | - | ||
204 | #title_pkg { | 202 | #title_pkg { |
205 | font-weight: bold; | 203 | font-weight: bold; |
206 | } | 204 | } |
@@ -212,5 +210,39 @@ font-weight: normal; | @@ -212,5 +210,39 @@ font-weight: normal; | ||
212 | font-size: 0.8em; | 210 | font-size: 0.8em; |
213 | } | 211 | } |
214 | 212 | ||
213 | +#optionalform { | ||
214 | +width: 400px; | ||
215 | +padding: 10px; | ||
216 | +float: none; | ||
217 | +} | ||
218 | + | ||
219 | +#optionalform label { | ||
220 | +font-weight: bold; | ||
221 | +text-align: right; | ||
222 | +} | ||
223 | + | ||
224 | +#optionalform textarea, | ||
225 | +#optionalform input.text { | ||
226 | +border: 1px solid #888a85; | ||
227 | +border-radius: 5px; | ||
228 | +box-shadow: 0 1px 4px gray inset; | ||
229 | +background: white; | ||
230 | +width: 340px; | ||
231 | +height: 20px; | ||
232 | +} | ||
233 | + | ||
234 | +#optionalform textarea { | ||
235 | +width: 390px; | ||
236 | +height: 50px; | ||
237 | +text-align: left; | ||
238 | +} | ||
215 | 239 | ||
240 | +#optionalform textarea:hover, | ||
241 | +#optionalform input:hover.text { | ||
242 | +border: 1px solid #000; | ||
243 | +box-shadow: 0 1px 4px gray; | ||
244 | +} | ||
216 | 245 | ||
246 | +#optionalform .text-left { | ||
247 | +text-align: left; | ||
248 | +} |
src/web/templates/thanks.html
@@ -3,6 +3,22 @@ $var title: Thanks | @@ -3,6 +3,22 @@ $var title: Thanks | ||
3 | $var mod = 'thanks'; | 3 | $var mod = 'thanks'; |
4 | $var cssfiles: static/css/survey.css | 4 | $var cssfiles: static/css/survey.css |
5 | 5 | ||
6 | +<style> | ||
7 | +#header { display: none; } | ||
8 | +#wrap { padding-top: 0px; } | ||
9 | +</style><!-- hidden top bar upload --> | ||
10 | + | ||
11 | +<script> | ||
12 | +function validateForm() | ||
13 | + { | ||
14 | + var n = $$("input[name=name]"); | ||
15 | + var e = $$("input[name=email]"); | ||
16 | + if ( !n.val() || !e.val() ) { | ||
17 | + alert("Write your Name and Email."); | ||
18 | + return false; | ||
19 | + } | ||
20 | +} | ||
21 | +</script> | ||
6 | 22 | ||
7 | <div id="maincontent"> | 23 | <div id="maincontent"> |
8 | <div class="innertube"> | 24 | <div class="innertube"> |
@@ -11,20 +27,25 @@ $var cssfiles: static/css/survey.css | @@ -11,20 +27,25 @@ $var cssfiles: static/css/survey.css | ||
11 | <h1>Thanks!</h1> | 27 | <h1>Thanks!</h1> |
12 | <p>Thank you very much for participating in this survey.</p><br /> | 28 | <p>Thank you very much for participating in this survey.</p><br /> |
13 | 29 | ||
30 | +<div id="optionalform"> | ||
31 | +<center> | ||
14 | <h2>Optional Info</h2> | 32 | <h2>Optional Info</h2> |
15 | -<p>Tell us your name if you want it to be published in our <br / > thanks page. | ||
16 | -If you also provide a valid e-mail address <br / > you will be sent the survey | ||
17 | -report as soon as it is ready.</p> | ||
18 | -<br /> | ||
19 | - <form action="/thanks" method="post" enctype="multipart/form-data" name="identification_form"> | ||
20 | - <p> | 33 | +<p> |
34 | + Tell us your name if you want it to be published in our | ||
35 | + thanks page. If you also provide a valid e-mail address | ||
36 | + you will be sent the survey report as soon as it is ready. | ||
37 | +</p><br /> | ||
38 | +</center> | ||
39 | + | ||
40 | + <form action="/thanks" method="post" enctype="multipart/form-data" name="identification_form" onsubmit="return validateForm()"> | ||
41 | + | ||
21 | <label> | 42 | <label> |
22 | - <input type="hidden" name="user_id" value=$user_id> | ||
23 | - Name: <input type="text" name="name" value="" size="35"> | 43 | + <input type="hidden" name="user_id" value=$user_id> |
44 | + Name: <input class="text" type="text" name="name" value="" size="40"> | ||
24 | </label></p> | 45 | </label></p> |
25 | <p> | 46 | <p> |
26 | <label> | 47 | <label> |
27 | - E-mail: <input type="text" name="email" value="" size="35"> | 48 | + E-mail: <input class="text" type="text" name="email" value="" size="40"> |
28 | </label></p> | 49 | </label></p> |
29 | <p> | 50 | <p> |
30 | <label> | 51 | <label> |
@@ -290,25 +311,19 @@ report as soon as it is ready.</p> | @@ -290,25 +311,19 @@ report as soon as it is ready.</p> | ||
290 | <option value="Zambia">Zambia</option> | 311 | <option value="Zambia">Zambia</option> |
291 | <option value="Zimbabwe">Zimbabwe</option> | 312 | <option value="Zimbabwe">Zimbabwe</option> |
292 | </select> | 313 | </select> |
293 | - </label></p> | 314 | + </label></p><br /> |
294 | <p> | 315 | <p> |
295 | - <label> | ||
296 | - Comments: | ||
297 | - <textarea name="comments" value="" rows="2" cols="32"></textarea> | 316 | + <label class="text-left"> |
317 | + Comments:<br /> | ||
318 | + <textarea name="comments" value="" rows="2" cols="50"></textarea> | ||
298 | </label></p> | 319 | </label></p> |
299 | <p><input type="submit" name="send_button" value="Submit" class="glass" | 320 | <p><input type="submit" name="send_button" value="Submit" class="glass" |
300 | id="finish-button"><p> | 321 | id="finish-button"><p> |
301 | </form> | 322 | </form> |
302 | -</center> | ||
303 | 323 | ||
304 | -<!-- | ||
305 | -<br style="clear: both" /> | ||
306 | -</div> | ||
307 | -</div> | 324 | +<div><!-- optionalform --> |
325 | +</center> | ||
308 | 326 | ||
309 | -<div id="maincontent"> | ||
310 | -<div class="innertube"> | ||
311 | ---> | ||
312 | 327 | ||
313 | <br style="clear: both" /> | 328 | <br style="clear: both" /> |
314 | </div><!-- class="innertube" --> | 329 | </div><!-- class="innertube" --> |