1 [% USE HTML %]<body class="admin">
3 <script type="text/javascript" src="js/common.js"></script>
4 <script type="text/javascript" src="js/jquery.js"></script>
5 <script type="text/javascript">
7 function open_connection_test_window() {
8 // host name port user passwd
9 var url = "admin.pl?INPUT_ENCODING=UTF-8&action=test_db_connection&" +
10 "dbhost=" + encodeURIComponent(get_input_value("dbhost")) + "&" +
11 "dbport=" + encodeURIComponent(get_input_value("dbport")) + "&" +
12 "dbname=" + encodeURIComponent(get_input_value("dbname")) + "&" +
13 "dbuser=" + encodeURIComponent(get_input_value("dbuser")) + "&" +
14 "dbpasswd=" + encodeURIComponent(get_input_value("dbpasswd")) + "&";
16 var parm = centerParms(400,300) + ",width=400,height=300,status=yes,scrollbars=yes";
18 window.open(url, "_new_generic", parm);
23 <form name="Form" id="Form" method="post" action="admin.pl">
25 <div class="listtop" width="100%">[% title %]</div>
32 <th align="right"><translate>Login</translate></th>
35 <input type="hidden" name="login" value="[% HTML.escape(myc_login) %]">[% HTML.escape(myc_login) %]
37 <input name="login" value="[% HTML.escape(myc_login) %]">
43 <th align="right"><translate>Password</translate></th>
44 <td>[% IF CAN_CHANGE_PASSWORD %]<input type="password" name="new_password" size="8" value="********">[% ELSE %]********[% END %]</td>
48 <th align="right"><translate>Name</translate></th>
49 <td><input name="name" size="15" value="[% HTML.escape(myc_name) %]"></td>
53 <th align="right"><translate>E-mail</translate></th>
54 <td><input name="email" size="30" value="[% HTML.escape(myc_email) %]"></td>
58 <th align="right"><translate>Signature</translate></th>
59 <td><textarea name="signature" rows="3" cols="35">[% HTML.escape(myc_signature) %]</textarea></td>
63 <th align="right"><translate>Phone</translate></th>
64 <td><input name="tel" size="14" value="[% HTML.escape(myc_tel) %]"></td>
68 <th align="right"><translate>Fax</translate></th>
69 <td><input name="fax" size="14" value="[% HTML.escape(myc_fax) %]"></td>
73 <th align="right"><translate>Company</translate></th>
74 <td><input name="company" size="35" value="[% HTML.escape(myc_company) %]"></td>
78 <th align="right"><translate>Address</translate></th>
79 <td><textarea name="address" rows="4" cols="35">[% HTML.escape(myc_address) %]</textarea></td>
83 <th align="right"><translate>Tax number</translate></th>
84 <td><input name="taxnumber" size="14" value="[% HTML.escape(myc_taxnumber) %]"></td>
88 <th align="right"><translate>Ust-IDNr</translate></th>
89 <td><input name="co_ustid" size="14" value="[% HTML.escape(myc_co_ustid) %]"></td>
93 <th align="right"><translate>DUNS-Nr</translate></th>
94 <td><input name="duns" size="14" value="[% HTML.escape(myc_duns) %]"></td>
102 <th align="right"><translate>Date Format</translate></th>
104 <select name="dateformat">
105 [% FOREACH row = ALL_DATEFORMATS %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.format) %]</option>
112 <th align="right"><translate>Number Format</translate></th>
114 <select name="numberformat">
115 [% FOREACH row = ALL_NUMBERFORMATS %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.format) %]</option>
122 <th align="right"><translate>Dropdown Limit</translate></th>
123 <td><input name="vclimit" value="[% HTML.escape(myc_vclimit) %]"></td>
127 <th align="right"><translate>Language</translate></th>
129 <translate>German</translate>
130 <input type="hidden" name="countrycode" value="de">
131 <!-- <select name="countrycode">
132 [% FOREACH row = ALL_COUNTRYCODES %]<option value="[% HTML.escape(row.value) %]" [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
139 <th align="right"><translate>Stylesheet</translate></th>
141 <select name="userstylesheet">
142 [% FOREACH row = ALL_STYLESHEETS %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
149 <th align="right"><translate>Printer</translate></th>
150 <td><input name="printer" size="20" value="[% HTML.escape(myc_printer) %]"></td>
153 <th align="right"><translate>Use Templates</translate></th>
155 <select name="usetemplates">
156 [% FOREACH row = ALL_TEMPLATES %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
162 <th align="right"><translate>New Templates</translate></th>
163 <td><input name="newtemplates"></td>
166 <th align="right"><translate>Setup Templates</translate></th>
168 <select name="mastertemplates">
169 [% FOREACH row = ALL_MASTER_TEMPLATES %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
175 <th align="right"><translate>Setup Menu</translate></th>
177 <select name="menustyle">
178 <option value="v3"[% IF menustyle_v3 %] selected[% END %]><translate>Top (CSS)</translate></option>
179 <option value="v4"[% IF menustyle_v4 %] selected[% END %]><translate>Top (CSS) new</translate></option>
180 <option value="neu"[% IF menustyle_neu %] selected[% END %]><translate>Top (Javascript)</translate></option>
181 <option value="xml"[% IF menustyle_xml %] selected[% END %]><translate>Top (XUL; only for Mozilla Firefox)</translate></option>
182 <option value="old"[% IF menustyle_old %] selected[% END %]><translate>Old (on the side)</translate></option>
187 <input type="hidden" name="templates" value="[% HTML.escape(myc_templates) %]">
192 <tr class="listheading">
193 <th colspan="2"><translate>Database</translate></th>
200 <th align="right"><translate>Driver</translate></th>
202 <th align="right"><translate>Host</translate></th>
203 <td><input name="dbhost" size="30" value="[% HTML.escape(myc_dbhost) %]"></td>
207 <th align="right"><translate>Dataset</translate></th>
208 <td><input name="dbname" size="15" value="[% HTML.escape(myc_dbname) %]"></td>
209 <th align="right"><translate>Port</translate></th>
210 <td><input name="dbport" size="4" value="[% HTML.escape(myc_dbport) %]"></td>
214 <th align="right"><translate>User</translate></th>
215 <td><input name="dbuser" size="15" value="[% HTML.escape(myc_dbuser) %]"></td>
216 <th align="right"><translate>Password</translate></th>
217 <td><input name="dbpasswd" type="password" size="10" value="[% HTML.escape(myc_dbpasswd) %]"></td>
221 <td colspan="2"><input type="button" class="submit" onclick="open_connection_test_window();" value="<translate>Test connection</translate>"></td>
227 <tr><td colspan="2"><hr size="3" noshade></td></tr>
229 <tr class="listheading">
230 <th colspan="2"><translate>WEBDAV access</translate></th>
238 <input name="angebote" id="angebote"class="checkbox" type="checkbox" value="1" [% IF myc_angebote %]checked[% END %]>
239 <label for="angebote"> Angebot</label>
242 <input name="bestellungen" id="bestellungen" class="checkbox" type="checkbox" value="1" [% IF myc_bestellungen %]checked[% END %]>
243 <label for="bestellungen"> Bestellung</label>
246 <input name="rechnungen" id="rechnungen" class="checkbox" type="checkbox" value="1" [% IF myc_rechnungen %]checked[% END %]>
247 <label for="rechnungen"> Rechnung</label>
253 <input name="anfragen" id="anfragen" class="checkbox" type="checkbox" value="1" [% IF myc_anfragen %]checked[% END %]>
254 <label for="anfragen"> Anfragen</label>
257 <input name="lieferantenbestellungen" id="lieferantenbestellungen" class="checkbox" type="checkbox" value="1" [% IF myc_lieferantenbestellungen %]checked[% END %]>
258 <label for="lieferantenbestellungen"> Lieferantenbestellung</label>
261 <input name="einkaufsrechnungen" id="einkaufsrechnungen" class="checkbox" type="checkbox" value="1" [% IF myc_einkaufsrechnungen %]checked[% END %]>
262 <label for="einkaufsrechnungen"> Einkaufsrechnung</label>
270 <tr><td colspan="2"><hr size="3" noshade></td></tr>
272 <tr class="listheading">
273 <th colspan="2"><translate>Group membership</translate></th>
277 <td colspan="2"><translate>The user is a member in the following group(s):</translate></td>
281 <td colspan="2">[% FOREACH row = GROUPS %]<a href="admin.pl?action=edit_group&group_id=[% HTML.url(row.id) %]">[% HTML.escape(row.name) %]</a>
282 [% UNLESS loop.last %] | [% END %][% END %]</td>
286 <tr><td colspan="2"><hr size="3" noshade></td></tr>
290 <input name="callback" type="hidden" value="admin.pl?action=list_users">
292 <input type="hidden" name="action" value="dispatcher">
293 <input type="submit" class="submit" name="action_save_user" value="<translate>Save</translate>">
296 [% FOREACH row = GROUPS %]
297 <input type="hidden" name="new_user_group_ids[]" value="[% HTML.escape(row.id) %]">
299 <input type="hidden" name="new_user_login" id="new_user_login" value="">
300 <input type="hidden" name="action_save_user_as_new" id="action_save_user_as_new" value="">
301 <input type="button" class="submit" id="save_as_new_button" value="<translate>Save as new</translate>">
302 <input type="submit" class="submit" name="action_delete_user" value="<translate>Delete</translate>">
303 <input type="hidden" name="edit" value="1">
308 <script type="text/javascript">
310 $(document).ready(function() {
311 $("#save_as_new_button").click(function() {
312 var new_user_login = prompt('<translate>Please enter the login for the new user.</translate>', '');
313 if (!new_user_login || (new_user_login == ''))
316 $("#action_save_user_as_new").attr('value', '1');
317 $("#new_user_login").attr('value', new_user_login);