2 [% USE HTML %]<body onload="document.Form.name.focus();">
4 <style type="text/css">
10 <div class="listtop">[% title %]</div>
12 <form action="amcvar.pl" name="Form" method="post">
17 <td align="right">[% 'Module' | $T8 %]</td>
19 [%- INCLUDE generic/multibox.html
22 label_key = 'description',
28 <td align="right">[% 'Variable Name' | $T8 %]<sup><span class="small">(1)</span></sup></td>
29 <td><input name="name" value="[% HTML.escape(name) %]"></td>
33 <td align="right">[% 'Variable Description' | $T8 %]<sup><span class="small">(2)</span></sup></td>
34 <td><input name="description" value="[% HTML.escape(description) %]"></td>
38 <td align="right">[% 'Type' | $T8 %]</td>
41 [%- FOREACH row = TYPES %]
42 <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
49 <td align="right">[% 'Default value' | $T8 %]<sup><span class="small">(3)</span></sup></td>
50 <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
54 <td align="right">[% 'Options' | $T8 %]<sup><span class="small">(4)</span></sup></td>
55 <td><input name="options" value="[% HTML.escape(options) %]"></td>
59 <td align="right">[% 'Is Searchable' | $T8 %]<sup><span class="small"></span></sup></td>
61 <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
62 <label for="searchable_1">[% 'Yes' | $T8 %]</label>
63 <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
64 <label for="searchable_0">[% 'No' | $T8 %]</label>
69 <td align="right">[% 'Includeable in reports' | $T8 %]<sup><span class="small"></span></sup></td>
71 <select name="inclusion">
72 <option value="no"[% UNLESS includeable %] selected[% END %]>[% 'No' | $T8 %]</option>
73 <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]>[% 'Yes' | $T8 %]</option>
74 <option value="yes_default_on"[% IF included_by_default %] selected[% END %]>[% 'Yes, included by default' | $T8 %]</option>
79 [%- IF module == 'IC' %]
81 <td align="right">[% 'Editable' | $T8 %]<sup><span class="small">(5)</span></sup></td>
83 <input type="radio" name="flag_editable" id="flag_editable_1" value="1"[% IF flag_editable %] checked[% END %]>
84 <label for="flag_editable_1">[% 'Yes' | $T8 %]</label>
85 <input type="radio" name="flag_editable" id="flag_editable_0" value="0"[% UNLESS flag_editable %] checked[% END %]>
86 <label for="flag_editable_0">[% 'No' | $T8 %]</label>
93 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
96 <input type="submit" name="action" value="[% 'Save' | $T8 %]">
98 <input type="submit" name="action" value="[% 'Delete' | $T8 %]">
104 <h3>[% 'Annotations' | $T8 %]</h3>
107 (1) [% 'The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present' | $T8 %]
111 (2) [% 'The description is shown on the form. Chose something short and descriptive.' | $T8 %]
115 (3) [% 'The default value depends on the variable type:' | $T8 %]
118 <li>[%- 'Text, text field and number variables: The default value will be used as-is.' | $T8 %]</li>
119 <li>[%- 'Boolean variables: If the default value is non-empty then the checkbox will be checked by default and unchecked otherwise.' | $T8 %]</li>
120 <li>[%- 'Date and timestamp variables: If the default value equals \'NOW\' then the current date/current timestamp will be used. Otherwise the default value is copied as-is.' | $T8 %]</li>
125 (4) [% 'The available options depend on the varibale type:' | $T8 %]
128 <li>[%- 'Text variables: \'MAXLENGTH=n\' sets the maximum entry length to \'n\'.' | $T8 %]</li>
129 <li>[%- 'Text field variables: \'WIDTH=w HEIGHT=h\' sets the width and height of the text field. They default to 30 and 5 respectively.' | $T8 %]</li>
130 <li>[%- 'Number variables: \'PRECISION=n\' forces numbers to be shown with exactly n decimal places.' | $T8 %]</li>
131 <li>[%- 'Selection fields: The option field must contain the available options for the selection. Options are separated by \'##\', for example \'Early##Normal##Late\'.' | $T8 %]</li>
134 [% 'Other values are ignored.' | $T8 %]
137 [%- IF module == 'IC' %]
141 [%- 'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' | $T8 %]
143 [% 'Otherwise the variable is only available for printing.' | $T8 %]