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>Name</translate><sup><span class="small">(1)</span></sup></td>
17 <td><input name="name" value="[% HTML.escape(name) %]"></td>
21 <td align="right"><translate>Description</translate><sup><span class="small">(2)</span></sup></td>
22 <td><input name="description" value="[% HTML.escape(description) %]"></td>
26 <td align="right"><translate>Type</translate></td>
29 [%- FOREACH row = TYPES %]
30 <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
37 <td align="right"><translate>Default value</translate><sup><span class="small">(3)</span></sup></td>
38 <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
42 <td align="right"><translate>Options</translate><sup><span class="small">(4)</span></sup></td>
43 <td><input name="options" value="[% HTML.escape(options) %]"></td>
47 <td align="right"><translate>Searchable</translate><sup><span class="small"></span></sup></td>
49 <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
50 <label for="searchable_1"><translate>Yes</translate></label>
51 <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
52 <label for="searchable_0"><translate>No</translate></label>
57 <td align="right"><translate>Includeable in reports</translate><sup><span class="small"></span></sup></td>
59 <select name="inclusion">
60 <option value="no"[% UNLESS includeable %] selected[% END %]><translate>No</translate></option>
61 <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]><translate>Yes</translate></option>
62 <option value="yes_default_on"[% IF included_by_default %] selected[% END %]><translate>Yes, included by default</translate></option>
69 <input type="hidden" name="module" value="[% HTML.escape(module) %]">
70 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
73 <input type="submit" name="action" value="<translate>Save</translate>">
75 <input type="submit" name="action" value="<translate>Delete</translate>">
81 <h3><translate>Annotations</translate></h3>
84 (1) <translate>The variable name must only consist of letters,
85 numbers and underscores. It must begin with a letter. Example:
86 send_christmas_present</translate>
90 (2) <translate>The description is shown on the form. Chose
91 something short and descriptive.</translate>
95 (3) <translate>The default value depends on the variable type:</translate>
98 <li><translate>Text, text field and number variables: The default
99 value will be used as-is.</translate></li>
100 <li><translate>Boolean variables: If the default value is
101 non-empty then the checkbox will be checked by default and
102 unchecked otherwise.</translate></li>
103 <li><translate>Date and timestamp variables: If the default value
104 equals 'NOW' then the current date/current timestamp will be
105 used. Otherwise the default value is copied as-is.</translate></li>
110 (4) <translate>The available options depend on the varibale
114 <li><translate>Text variables: 'MAXLENGTH=n' sets the maximum
115 entry length to 'n'.</translate></li>
116 <li><translate>Text field variables: 'WIDTH=w HEIGHT=h' sets the
117 width and height of the text field. They default to 30 and 5
118 respectively.</translate></li>
119 <li><translate>Number variables: 'PRECISION=n' forces numbers to
120 be shown with exactly n decimal places.</translate></li>
121 <li><translate>Selection fields: The option field must contain the
122 available options for the selection. Options are separated by
123 '##', for example 'Early##Normal##Late'.</translate></li>
126 <translate>Other values are ignored.</translate>