4 [%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
6 [%- IF hide_non_editable && !var.flag_editable %]
7 <input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
9 [%- ELSIF !var.valid %]
10 [%- IF show_disabled_message %]
11 <i>[% 'Element disabled' | $T8 %]</i>
14 [%- ELSIF var.type == 'bool' %]
15 <input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
17 [%- ELSIF var.type == 'textfield' %]
18 <textarea name="[% var_name %]" cols="[% HTML.escape(var.width) %]" rows="[% HTML.escape(var.height) %]">[% HTML.escape(var.value) %]</textarea>
20 [%- ELSIF var.type == 'date' %]
21 <input name="[% var_name %]" id="[% var_name %]" size="12" value="[% HTML.escape(var.value) %]">
22 <input name="[% var_name %]_button" id="[% var_name %]_trigger" type="button" value="?">
24 <script type="text/javascript">
26 Calendar.setup({ inputField : "[% var_name %]",
27 ifFormat : "[% myconfig_jsc_dateformat %]",
29 button : "[% var_name %]_trigger" });
33 [%- ELSIF var.type == 'timestamp' %]
34 <input name="[% var_name %]" value="[% HTML.escape(var.value) %]">
36 [%- ELSIF var.type == 'select' %]
38 <select name="[% var_name %]">
39 [%- FOREACH option = var.OPTIONS %]
40 <option[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
45 <input name="[% var_name %]" value="[% HTML.escape(var.value) %]" [%- IF var.maxlength %] maxlength="[% HTML.escape(var.maxlength) %]"[% END -%]>