1 [% USE HTML %]<body onload="document.Form.name.focus();">
3 <style type="text/css">
9 <div class="listtop">[% title %]</div>
11 <form action="amcvar.pl" name="Form" method="post">
16 <td align="right">Module</td>
18 [%- INCLUDE generic/multibox.html
21 label_key = 'description',
27 <td align="right">Name<sup><span class="small">(1)</span></sup></td>
28 <td><input name="name" value="[% HTML.escape(name) %]"></td>
32 <td align="right">Description<sup><span class="small">(2)</span></sup></td>
33 <td><input name="description" value="[% HTML.escape(description) %]"></td>
37 <td align="right">Type</td>
40 [%- FOREACH row = TYPES %]
41 <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
48 <td align="right">Default value<sup><span class="small">(3)</span></sup></td>
49 <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
53 <td align="right">Options<sup><span class="small">(4)</span></sup></td>
54 <td><input name="options" value="[% HTML.escape(options) %]"></td>
58 <td align="right">Searchable<sup><span class="small"></span></sup></td>
60 <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
61 <label for="searchable_1">Yes</label>
62 <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
63 <label for="searchable_0">No</label>
68 <td align="right">Includeable in reports<sup><span class="small"></span></sup></td>
70 <select name="inclusion">
71 <option value="no"[% UNLESS includeable %] selected[% END %]>No</option>
72 <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]>Yes</option>
73 <option value="yes_default_on"[% IF included_by_default %] selected[% END %]>Yes, included by default</option>
78 [%- IF module == 'IC' %]
80 <td align="right">Editable<sup><span class="small">(5)</span></sup></td>
82 <input type="radio" name="flag_editable" id="flag_editable_1" value="1"[% IF flag_editable %] checked[% END %]>
83 <label for="flag_editable_1">Yes</label>
84 <input type="radio" name="flag_editable" id="flag_editable_0" value="0"[% UNLESS flag_editable %] checked[% END %]>
85 <label for="flag_editable_0">No</label>
92 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
95 <input type="submit" name="action" value="Save">
97 <input type="submit" name="action" value="Delete">
106 (1) The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present
110 (2) The description is shown on the form. Chose something short and descriptive.
114 (3) The default value depends on the variable type:
117 <li>Text, text field and number variables: The default value will be used as-is.</li>
118 <li>Boolean variables: If the default value is non-empty then the checkbox will be checked by default and unchecked otherwise.</li>
119 <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.</li>
124 (4) The available options depend on the varibale type:
127 <li>Text variables: 'MAXLENGTH=n' sets the maximum entry length to 'n'.</li>
128 <li>Text field variables: 'WIDTH=w HEIGHT=h' sets the width and height of the text field. They default to 30 and 5 respectively.</li>
129 <li>Number variables: 'PRECISION=n' forces numbers to be shown with exactly n decimal places.</li>
130 <li>Selection fields: The option field must contain the available options for the selection. Options are separated by '##', for example 'Early##Normal##Late'.</li>
133 Other values are ignored.
136 [%- IF module == 'IC' %]
140 A variable marked as 'editable' can be changed in each quotation, order, invoice etc.
142 Otherwise the variable is only available for printing.