| 1 |
[% PROCESS form_start -%] |
| 2 |
<div class="form_messages"> |
| 3 |
[% FOREACH err IN form.form_errors -%] |
| 4 |
<span class="error_message">[% err %]</span> |
| 5 |
[% END -%] |
| 6 |
</div> |
| 7 |
[% FOREACH f IN form.sorted_fields -%] |
| 8 |
[% WRAPPER "wrapper_${f.uwrapper}" -%][% PROCESS "${f.uwidget}" -%][% END -%] |
| 9 |
[% END -%] |
| 10 |
[% PROCESS form_end -%] |
| 11 |
|
| 12 |
[% BLOCK form_start -%] |
| 13 |
<form[% process_attrs(form.attributes) %]> |
| 14 |
[% END -%] |
| 15 |
|
| 16 |
[% BLOCK form_end -%] |
| 17 |
</form> |
| 18 |
[% END -%] |
| 19 |
|
| 20 |
[% BLOCK button -%] |
| 21 |
<input type="button" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.value %]" /> |
| 22 |
[% END -%] |
| 23 |
|
| 24 |
[% BLOCK checkbox -%] |
| 25 |
<input type="checkbox" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.checkbox_value -%]"[% IF f.fif == f.checkbox_value -%] checked="checked"[% END ~%] />[%~ ~%] |
| 26 |
[% END -%] |
| 27 |
|
| 28 |
[% BLOCK checkbox_group -%] |
| 29 |
[% FOR option IN f.options -%] |
| 30 |
<label class="checkbox" for="[% f.name %].[% loop.index %]"> |
| 31 |
<input type="checkbox" value="[% option.value %]" name="[% f.name %]" id="[% f.name %].[% loop.index %]"[% FOREACH selval IN f.fif -%][% IF selval == option.value %] checked="checked"[% END -%][% END -%]> |
| 32 |
[% option.label | html %] |
| 33 |
</label> |
| 34 |
[% END -%] |
| 35 |
[% END -%] |
| 36 |
|
| 37 |
[% BLOCK compound -%] |
| 38 |
[% FOREACH sf IN f.sorted_fields -%] |
| 39 |
[% outerf = f; f = sf; -%] |
| 40 |
[% WRAPPER "wrapper_${f.uwrapper}" %][% PROCESS "${f.uwidget}" -%][% END -%] |
| 41 |
[% f = outerf -%] |
| 42 |
[% END -%] |
| 43 |
[% END -%] |
| 44 |
|
| 45 |
[% BLOCK hidden -%] |
| 46 |
<input type="hidden" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.fif %]" /> |
| 47 |
[% END -%] |
| 48 |
|
| 49 |
[% BLOCK password -%] |
| 50 |
<input type="password" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.fif %]" /> |
| 51 |
[% END -%] |
| 52 |
|
| 53 |
[% BLOCK radio_group -%] |
| 54 |
[% FOR option IN f.options -%] |
| 55 |
<label for="[% f.id %].[% loop.index %]"><input type="radio" value="[% option.value %]" name="[% f.name %]" id="[% f.id %].[% loop.index %]" [% IF option.value == f.fif %] checked="checked"[% END %] />[% option.label %]</label> |
| 56 |
[% END -%] |
| 57 |
[% END -%] |
| 58 |
|
| 59 |
[% BLOCK repeatable -%] |
| 60 |
[% FOREACH rf IN f.sorted_fields -%] |
| 61 |
[% outerrf = f; f = rf; -%] |
| 62 |
[% WRAPPER "wrapper_${f.uwrapper}" %][% PROCESS "${f.uwidget}" -%][% END -%] |
| 63 |
[% f = outerrf -%] |
| 64 |
[% END -%] |
| 65 |
[% END -%] |
| 66 |
|
| 67 |
[% BLOCK reset -%] |
| 68 |
<input type="reset" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.value %]" /> |
| 69 |
[% END -%] |
| 70 |
|
| 71 |
[% BLOCK select -%] |
| 72 |
<select name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %][% IF f.multiple %] multiple="multiple" size="[% f.size %]" [% END -%]> |
| 73 |
[% FOR option IN f.options -%] |
| 74 |
<option id="[% f.id %].[% loop.index %]" value="[% option.value -%]"[% FOREACH selval IN f.fif -%][% IF selval == option.value %] selected="selected"[% END -%][% END -%]>[% option.label | html %]</option> |
| 75 |
[% END -%] |
| 76 |
</select> |
| 77 |
[% END -%] |
| 78 |
|
| 79 |
[% BLOCK submit -%] |
| 80 |
<input type="submit" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.value %]" /> |
| 81 |
[% END -%] |
| 82 |
|
| 83 |
[% BLOCK text -%] |
| 84 |
<input type="[% f.input_type %]" name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %] value="[% f.fif %]" /> |
| 85 |
[% END -%] |
| 86 |
|
| 87 |
[% BLOCK textarea -%] |
| 88 |
<textarea name="[% f.html_name %]" id="[% f.id %]" rows="[% f.rows %]" cols="[% f.cols %]" [% process_attrs(f.attributes) %]>[% f.fif %]</textarea> |
| 89 |
[% END -%] |
| 90 |
|
| 91 |
[% BLOCK upload -%] |
| 92 |
<input type="file" name="[% f.html_name %]" id="[% f.html_name %]"[% process_attrs(f.attributes) %] /> |
| 93 |
[% END -%] |
| 94 |
|
| 95 |
[% BLOCK wrapper_simple -%] |
| 96 |
<div[% process_attrs(f.wrapper_attributes) -%]> |
| 97 |
[% IF f.do_label %][% PROCESS label %][% END -%] |
| 98 |
[% content -%] |
| 99 |
</div> |
| 100 |
[% END -%] |
| 101 |
|
| 102 |
[% BLOCK label -%] |
| 103 |
<label [% process_attrs(f.label_attributes) %]for="[% f.html_name %]">[% f.label %]</label> |
| 104 |
[% END -%] |
| 105 |
|
| 106 |
[% BLOCK wrapper_wrap_label -%] |
| 107 |
<div[% process_attrs(f.wrapper_attributes) %]><label[% process_attrs(f.label_attributes) %] for="[% f.html_name %]">[%~ content ~%][%~ f.label %]</label></div> |
| 108 |
[% END -%] |
| 109 |
|
| 110 |
[% BLOCK wrapper_none -%] |
| 111 |
[% content %] |
| 112 |
[% END -%] |
| 113 |
|
| 114 |
[% BLOCK wrapper_fieldset -%] |
| 115 |
<fieldset[% process_attrs(f.wrapper_attributes)%]><legend>[% f.label %]</legend> |
| 116 |
[% content -%] |
| 117 |
</fieldset> |
| 118 |
[% END -%] |