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"><translate>Module</translate></td>
18 [%- IF module == 'CT' %]
19 <translate>Customers and vendors</translate>
20 [%- ELSIF module == 'Projects' %]
21 <translate>Projects</translate>
22 [%- ELSIF module == 'IC' %]
23 <translate>Parts, services and assemblies</translate>
29 <td align="right"><translate>Name</translate><sup><span class="small">(1)</span></sup></td>
30 <td><input name="name" value="[% HTML.escape(name) %]"></td>
34 <td align="right"><translate>Description</translate><sup><span class="small">(2)</span></sup></td>
35 <td><input name="description" value="[% HTML.escape(description) %]"></td>
39 <td align="right"><translate>Type</translate></td>
42 [%- FOREACH row = TYPES %]
43 <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
50 <td align="right"><translate>Default value</translate><sup><span class="small">(3)</span></sup></td>
51 <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
55 <td align="right"><translate>Options</translate><sup><span class="small">(4)</span></sup></td>
56 <td><input name="options" value="[% HTML.escape(options) %]"></td>
60 <td align="right"><translate>Searchable</translate><sup><span class="small"></span></sup></td>
62 <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
63 <label for="searchable_1"><translate>Yes</translate></label>
64 <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
65 <label for="searchable_0"><translate>No</translate></label>
70 <td align="right"><translate>Includeable in reports</translate><sup><span class="small"></span></sup></td>
72 <select name="inclusion">
73 <option value="no"[% UNLESS includeable %] selected[% END %]><translate>No</translate></option>
74 <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]><translate>Yes</translate></option>
75 <option value="yes_default_on"[% IF included_by_default %] selected[% END %]><translate>Yes, included by default</translate></option>
80 [%- IF module == 'IC' %]
82 <td align="right"><translate>Editable</translate><sup><span class="small">(5)</span></sup></td>
84 <input type="radio" name="flag_editable" id="flag_editable_1" value="1"[% IF flag_editable %] checked[% END %]>
85 <label for="flag_editable_1"><translate>Yes</translate></label>
86 <input type="radio" name="flag_editable" id="flag_editable_0" value="0"[% UNLESS flag_editable %] checked[% END %]>
87 <label for="flag_editable_0"><translate>No</translate></label>
94 <input type="hidden" name="module" value="[% HTML.escape(module) %]">
95 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
98 <input type="submit" name="action" value="<translate>Save</translate>">
100 <input type="submit" name="action" value="<translate>Delete</translate>">
106 <h3><translate>Annotations</translate></h3>
109 (1) <translate>The variable name must only consist of letters,
110 numbers and underscores. It must begin with a letter. Example:
111 send_christmas_present</translate>
115 (2) <translate>The description is shown on the form. Chose
116 something short and descriptive.</translate>
120 (3) <translate>The default value depends on the variable type:</translate>
123 <li><translate>Text, text field and number variables: The default
124 value will be used as-is.</translate></li>
125 <li><translate>Boolean variables: If the default value is
126 non-empty then the checkbox will be checked by default and
127 unchecked otherwise.</translate></li>
128 <li><translate>Date and timestamp variables: If the default value
129 equals 'NOW' then the current date/current timestamp will be
130 used. Otherwise the default value is copied as-is.</translate></li>
135 (4) <translate>The available options depend on the varibale
139 <li><translate>Text variables: 'MAXLENGTH=n' sets the maximum
140 entry length to 'n'.</translate></li>
141 <li><translate>Text field variables: 'WIDTH=w HEIGHT=h' sets the
142 width and height of the text field. They default to 30 and 5
143 respectively.</translate></li>
144 <li><translate>Number variables: 'PRECISION=n' forces numbers to
145 be shown with exactly n decimal places.</translate></li>
146 <li><translate>Selection fields: The option field must contain the
147 available options for the selection. Options are separated by
148 '##', for example 'Early##Normal##Late'.</translate></li>
151 <translate>Other values are ignored.</translate>
154 [%- IF module == 'IC' %]
158 <translate>A variable marked as 'editable' can be changed in each
159 quotation, order, invoice etc.</translate>
161 <translate>Otherwise the variable is only available for
162 printing.</translate>