3 <body onload="document.Form.name.focus();">
5 <style type="text/css">
11 <div class="listtop">[% title %]</div>
13 <form action="amcvar.pl" name="Form" method="post">
18 <td align="right">[% 'Module' | $T8 %]</td>
20 [%- INCLUDE generic/multibox.html
23 label_key = 'description',
25 onChange = "document.getElementById('update_button').click();" %]
30 <td align="right">[% 'Variable Name' | $T8 %]<sup><span class="small">(1)</span></sup></td>
31 <td><input name="name" value="[% HTML.escape(name) %]"></td>
35 <td align="right">[% 'Variable Description' | $T8 %]<sup><span class="small">(2)</span></sup></td>
36 <td><input name="description" value="[% HTML.escape(description) %]"></td>
40 <td align="right">[% 'Type' | $T8 %]<sup><span class="small">(3)</span></sup></td>
43 [%- FOREACH row = TYPES %]
44 <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
51 <td align="right">[% 'Default value' | $T8 %]<sup><span class="small">(4)</span></sup></td>
52 <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
56 <td align="right">[% 'Options' | $T8 %]<sup><span class="small">(5)</span></sup></td>
57 <td><input name="options" value="[% HTML.escape(options) %]"></td>
61 <td align="right">[% 'Is Searchable' | $T8 %]<sup><span class="small"></span></sup></td>
63 <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
64 <label for="searchable_1">[% 'Yes' | $T8 %]</label>
65 <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
66 <label for="searchable_0">[% 'No' | $T8 %]</label>
71 <td align="right">[% 'Includeable in reports' | $T8 %]<sup><span class="small"></span></sup></td>
73 <select name="inclusion">
74 <option value="no"[% UNLESS includeable %] selected[% END %]>[% 'No' | $T8 %]</option>
75 <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]>[% 'Yes' | $T8 %]</option>
76 <option value="yes_default_on"[% IF included_by_default %] selected[% END %]>[% 'Yes, included by default' | $T8 %]</option>
81 [%- IF module == 'IC' %]
83 <td align="right">[% 'Editable' | $T8 %]<sup><span class="small">(5)</span></sup></td>
85 <input type="radio" name="flag_editable" id="flag_editable_1" value="1"[% IF flag_editable %] checked[% END %]>
86 <label for="flag_editable_1">[% 'Yes' | $T8 %]</label>
87 <input type="radio" name="flag_editable" id="flag_editable_0" value="0"[% UNLESS flag_editable %] checked[% END %]>
88 <label for="flag_editable_0">[% 'No' | $T8 %]</label>
95 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
98 <input type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
99 <input type="submit" name="action" value="[% 'Save' | $T8 %]">
101 <input type="submit" name="action" value="[% 'Delete' | $T8 %]">
107 <h3>[% 'Annotations' | $T8 %]</h3>
110 (1) [% 'The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present' | $T8 %]
114 (2) [% 'The description is shown on the form. Chose something short and descriptive.' | $T8 %]
117 (3) [% 'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' | $T8 %]
121 (4) [% 'The default value depends on the variable type:' | $T8 %]
124 <li>[%- 'Text, text field and number variables: The default value will be used as-is.' | $T8 %]</li>
125 <li>[%- 'Boolean variables: If the default value is non-empty then the checkbox will be checked by default and unchecked otherwise.' | $T8 %]</li>
126 <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>
131 (5) [% 'The available options depend on the varibale type:' | $T8 %]
134 <li>[%- 'Text variables: \'MAXLENGTH=n\' sets the maximum entry length to \'n\'.' | $T8 %]</li>
135 <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>
136 <li>[%- 'Number variables: \'PRECISION=n\' forces numbers to be shown with exactly n decimal places.' | $T8 %]</li>
137 <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>
140 [% 'Other values are ignored.' | $T8 %]
143 [%- IF module == 'IC' %]
147 [%- 'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' | $T8 %]
149 [% 'Otherwise the variable is only available for printing.' | $T8 %]