[FIX] Error reports
[cds-indico.git] / indico / MaKaC / webinterface / tpls / ConfRegistrationFormDisplay.tpl
blobcf3b5d25a84cb1f1c9f15b8e326f9bb75e76da53
1 <script>
2   var validators = [];
3   var parameterManager = new IndicoUtil.parameterManager();
4   var addParam = parameterManager.add;
6   function addValidator(validator) {
7       validators.push(validator);
8   }
10   function enableAll(f) {
11     for (i = 0; i < f.elements.length; i++) {
12       f.elements[i].disabled=false
13     }
14   }
16   function formSubmit(f) {
17       if (!parameterManager.check()) {
18           alert($T("The form contains some errors. Please, correct them and submit again."));
19           return false;
20       }
22       for (var i in validators) {
23           var validator = validators[i];
24           if (!validator()) {
25               return false;
26           }
27       }
29       enableAll(f);
30       return true;
31   }
32 </script>
34 <form action=${ postURL } method="POST" onSubmit="return formSubmit(this);" enctype="multipart/form-data">
35 <table width="70%" align="center">
36     <tr><td>&nbsp;</td></tr>
37     <tr>
38         <td nowrap class="title"><center>${ title }</center></td>
39     </tr>
40     <tr>
41         <td colspan="2" align="left">
42             <br><b>${ _("""Please, note that fields marked with <font color="red">*</font> are mandatory""")}</b><br>
43         </td>
44     </tr>
45     <tr>
46         <td><br></td>
47     </tr>
48     ${ otherSections }
49     <tr>
50         <td><br></td>
51     </tr>
52     <tr>
53         <td align="center" class="regFormBottomLine"><input type="submit" class="btn" value="register" onClick="return confirm('${ _("Are you sure you want to submit this form?") }');"></td>
54     </tr>
55 </table>
56 <br>
57 </form>