3eccf69a27cca3f2d477c23a45b0c5375ddb7e12
[kivitendo-erp.git] / templates / webpages / amcvar / display_cvar_config_form.html
1 [%- USE T8 %]
2 [% USE HTML %]<body onload="document.Form.name.focus();">
3
4  <style type="text/css">
5   .small {
6     font-size: 0.75em;
7   }
8  </style>
9
10  <div class="listtop">[% title %]</div>
11
12  <form action="amcvar.pl" name="Form" method="post">
13
14   <p>
15    <table>
16     <tr>
17      <td align="right">[% 'Module' | $T8 %]</td>
18      <td>
19       [%- INCLUDE generic/multibox.html
20             name      = 'module',
21             id_key    = 'module',
22             label_key = 'description',
23             DATA      = MODULES,
24             onChange   = "document.getElementById('update_button').click();" %]
25      </td>
26     </tr>
27
28     <tr>
29      <td align="right">[% 'Variable Name' | $T8 %]<sup><span class="small">(1)</span></sup></td>
30      <td><input name="name" value="[% HTML.escape(name) %]"></td>
31     </tr>
32
33     <tr>
34      <td align="right">[% 'Variable Description' | $T8 %]<sup><span class="small">(2)</span></sup></td>
35      <td><input name="description" value="[% HTML.escape(description) %]"></td>
36     </tr>
37
38     <tr>
39      <td align="right">[% 'Type' | $T8 %]<sup><span class="small">(3)</span></sup></td>
40      <td>
41       <select name="type">
42        [%- FOREACH row = TYPES %]
43        <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
44        [%- END %]
45       </select>
46      </td>
47     </tr>
48
49     <tr>
50      <td align="right">[% 'Default value' | $T8 %]<sup><span class="small">(4)</span></sup></td>
51      <td><input name="default_value" value="[% HTML.escape(default_value) %]"></td>
52     </tr>
53
54     <tr>
55      <td align="right">[% 'Options' | $T8 %]<sup><span class="small">(5)</span></sup></td>
56      <td><input name="options" value="[% HTML.escape(options) %]"></td>
57     </tr>
58
59     <tr>
60      <td align="right">[% 'Is Searchable' | $T8 %]<sup><span class="small"></span></sup></td>
61      <td>
62       <input type="radio" name="searchable" id="searchable_1" value="1"[% IF searchable %] checked[% END %]>
63       <label for="searchable_1">[% 'Yes' | $T8 %]</label>
64       <input type="radio" name="searchable" id="searchable_0" value="0"[% UNLESS searchable %] checked[% END %]>
65       <label for="searchable_0">[% 'No' | $T8 %]</label>
66      </td>
67     </tr>
68
69     <tr>
70      <td align="right">[% 'Includeable in reports' | $T8 %]<sup><span class="small"></span></sup></td>
71      <td>
72       <select name="inclusion">
73        <option value="no"[% UNLESS includeable %] selected[% END %]>[% 'No' | $T8 %]</option>
74        <option value="yes"[% IF includeable && !included_by_default %] selected[% END %]>[% 'Yes' | $T8 %]</option>
75        <option value="yes_default_on"[% IF included_by_default %] selected[% END %]>[% 'Yes, included by default' | $T8 %]</option>
76       </select>
77      </td>
78     </tr>
79
80     [%- IF module == 'IC' %]
81     <tr>
82      <td align="right">[% 'Editable' | $T8 %]<sup><span class="small">(5)</span></sup></td>
83      <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">[% 'Yes' | $T8 %]</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">[% 'No' | $T8 %]</label>
88      </td>
89     </tr>
90     [%- END %]
91    </table>
92   </p>
93
94   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
95
96   <p>
97    <input type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
98    <input type="submit" name="action" value="[% 'Save' | $T8 %]">
99    [%- IF id %]
100    <input type="submit" name="action" value="[% 'Delete' | $T8 %]">
101    [%- END %]
102   </p>
103
104   <hr>
105
106   <h3>[% 'Annotations' | $T8 %]</h3>
107
108   <p>
109    (1) [% 'The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present' | $T8 %]
110   </p>
111
112   <p>
113    (2) [% 'The description is shown on the form. Chose something short and descriptive.' | $T8 %]
114   </p>
115   <p>
116    (3) [% 'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' | $T8 %]
117   </p>
118
119   <p>
120    (4) [% 'The default value depends on the variable type:' | $T8 %]
121    <br>
122    <ul>
123     <li>[%- 'Text, text field and number variables: The default value will be used as-is.' | $T8 %]</li>
124     <li>[%- 'Boolean variables: If the default value is non-empty then the checkbox will be checked by default and unchecked otherwise.' | $T8 %]</li>
125     <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>
126    </ul>
127   </p>
128
129   <p>
130    (5) [% 'The available options depend on the varibale type:' | $T8 %]
131    <br>
132    <ul>
133     <li>[%- 'Text variables: \'MAXLENGTH=n\' sets the maximum entry length to \'n\'.' | $T8 %]</li>
134     <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>
135     <li>[%- 'Number variables: \'PRECISION=n\' forces numbers to be shown with exactly n decimal places.' | $T8 %]</li>
136     <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>
137    </ul>
138    <br>
139    [% 'Other values are ignored.' | $T8 %]
140   </p>
141
142   [%- IF module == 'IC' %]
143   <p>
144    (6)
145
146    [%- 'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' | $T8 %]
147
148    [% 'Otherwise the variable is only available for printing.' | $T8 %]
149   </p>
150   [%- END %]
151
152  </form>
153
154 </body>
155 </html>