</html> entfernen
[kivitendo-erp.git] / templates / webpages / amcvar / display_cvar_config_form.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 <body onload="document.Form.name.focus();">
4
5  <style type="text/css">
6   .small {
7     font-size: 0.75em;
8   }
9  </style>
10
11  <div class="listtop">[% title %]</div>
12
13  <form action="amcvar.pl" name="Form" method="post">
14
15   <p>
16    <table>
17     <tr>
18      <td align="right">[% 'Module' | $T8 %]</td>
19      <td>
20       [%- INCLUDE generic/multibox.html
21             name      = 'module',
22             id_key    = 'module',
23             label_key = 'description',
24             DATA      = MODULES,
25             onChange   = "document.getElementById('update_button').click();" %]
26      </td>
27     </tr>
28
29     <tr>
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>
32     </tr>
33
34     <tr>
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>
37     </tr>
38
39     <tr>
40      <td align="right">[% 'Type' | $T8 %]<sup><span class="small">(3)</span></sup></td>
41      <td>
42       <select name="type">
43        [%- FOREACH row = TYPES %]
44        <option value="[% HTML.escape(row.type) %]"[% IF row.type == type %] selected[% END %]>[% HTML.escape(row.type_tr) %]</option>
45        [%- END %]
46       </select>
47      </td>
48     </tr>
49
50     <tr>
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>
53     </tr>
54
55     <tr>
56      <td align="right">[% 'Options' | $T8 %]<sup><span class="small">(5)</span></sup></td>
57      <td><input name="options" value="[% HTML.escape(options) %]"></td>
58     </tr>
59
60     <tr>
61      <td align="right">[% 'Is Searchable' | $T8 %]<sup><span class="small"></span></sup></td>
62      <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>
67      </td>
68     </tr>
69
70     <tr>
71      <td align="right">[% 'Includeable in reports' | $T8 %]<sup><span class="small"></span></sup></td>
72      <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>
77       </select>
78      </td>
79     </tr>
80
81     [%- IF module == 'IC' %]
82     <tr>
83      <td align="right">[% 'Editable' | $T8 %]<sup><span class="small">(5)</span></sup></td>
84      <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>
89      </td>
90     </tr>
91     [%- END %]
92    </table>
93   </p>
94
95   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
96
97   <p>
98    <input type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
99    <input type="submit" name="action" value="[% 'Save' | $T8 %]">
100    [%- IF id %]
101    <input type="submit" name="action" value="[% 'Delete' | $T8 %]">
102    [%- END %]
103   </p>
104
105   <hr>
106
107   <h3>[% 'Annotations' | $T8 %]</h3>
108
109   <p>
110    (1) [% 'The variable name must only consist of letters, numbers and underscores. It must begin with a letter. Example: send_christmas_present' | $T8 %]
111   </p>
112
113   <p>
114    (2) [% 'The description is shown on the form. Chose something short and descriptive.' | $T8 %]
115   </p>
116   <p>
117    (3) [% 'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' | $T8 %]
118   </p>
119
120   <p>
121    (4) [% 'The default value depends on the variable type:' | $T8 %]
122    <br>
123    <ul>
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>
127    </ul>
128   </p>
129
130   <p>
131    (5) [% 'The available options depend on the varibale type:' | $T8 %]
132    <br>
133    <ul>
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>
138    </ul>
139    <br>
140    [% 'Other values are ignored.' | $T8 %]
141   </p>
142
143   [%- IF module == 'IC' %]
144   <p>
145    (6)
146
147    [%- 'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' | $T8 %]
148
149    [% 'Otherwise the variable is only available for printing.' | $T8 %]
150   </p>
151   [%- END %]
152
153  </form>
154
155 </body>