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">Login</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">Password</th>
 
  44        <td>[% IF CAN_CHANGE_PASSWORD %]<input type="password" name="new_password" size="8" value="********">[% ELSE %]********[% END %]</td>
 
  48        <th align="right">Name</th>
 
  49        <td><input name="name" size="15" value="[% HTML.escape(myc_name) %]"></td>
 
  53        <th align="right">E-mail</th>
 
  54        <td><input name="email" size="30" value="[% HTML.escape(myc_email) %]"></td>
 
  58        <th align="right">Signature</th>
 
  59        <td><textarea name="signature" rows="3" cols="35">[% HTML.escape(myc_signature) %]</textarea></td>
 
  63        <th align="right">Phone</th>
 
  64        <td><input name="tel" size="14" value="[% HTML.escape(myc_tel) %]"></td>
 
  68        <th align="right">Fax</th>
 
  69        <td><input name="fax" size="14" value="[% HTML.escape(myc_fax) %]"></td>
 
  73        <th align="right">Company</th>
 
  74        <td><input name="company" size="35" value="[% HTML.escape(myc_company) %]"></td>
 
  78        <th align="right">Address</th>
 
  79        <td><textarea name="address" rows="4" cols="35">[% HTML.escape(myc_address) %]</textarea></td>
 
  83        <th align="right">Tax number</th>
 
  84        <td><input name="taxnumber" size="14" value="[% HTML.escape(myc_taxnumber) %]"></td>
 
  88        <th align="right">Ust-IDNr</th>
 
  89        <td><input name="co_ustid" size="14" value="[% HTML.escape(myc_co_ustid) %]"></td>
 
  93        <th align="right">DUNS-Nr</th>
 
  94        <td><input name="duns" size="14" value="[% HTML.escape(myc_duns) %]"></td>
 
 102        <th align="right">Date Format</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">Number Format</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">Dropdown Limit</th>
 
 123        <td><input name="vclimit" value="[% HTML.escape(myc_vclimit) %]"></td>
 
 127        <th align="right">Language</th>
 
 129         <select name="countrycode">
 
 130          [% FOREACH row = ALL_COUNTRYCODES %]<option value="[% HTML.escape(row.value) %]" [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
 
 137        <th align="right">Stylesheet</th>
 
 139         <select name="userstylesheet">
 
 140          [% FOREACH row = ALL_STYLESHEETS %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
 
 147        <th align="right">Printer</th>
 
 148        <td><input name="printer" size="20" value="[% HTML.escape(myc_printer) %]"></td>
 
 151        <th align="right">Use Templates</th>
 
 153         <select name="usetemplates">
 
 154          [% FOREACH row = ALL_TEMPLATES %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
 
 160        <th align="right">New Templates</th>
 
 161        <td><input name="newtemplates"></td>
 
 164        <th align="right">Setup Templates</th>
 
 166         <select name="mastertemplates">
 
 167          [% FOREACH row = ALL_MASTER_TEMPLATES %]<option [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) %]</option>
 
 173        <th align="right">Setup Menu</th>
 
 175         <select name="menustyle">
 
 176          <option value="v3"[% IF menustyle_v3 %] selected[% END %]>Top (CSS)</option>
 
 177          <option value="v4"[% IF menustyle_v4 %] selected[% END %]>Top (CSS) new</option>
 
 178          <option value="neu"[% IF menustyle_neu %] selected[% END %]>Top (Javascript)</option>
 
 179          <option value="xml"[% IF menustyle_xml %] selected[% END %]>Top (XUL; only for Mozilla Firefox)</option>
 
 180          <option value="old"[% IF menustyle_old %] selected[% END %]>Old (on the side)</option>
 
 185       <input type="hidden" name="templates" value="[% HTML.escape(myc_templates) %]">
 
 190    <tr class="listheading">
 
 191     <th colspan="2">Database</th>
 
 198        <th align="right">Driver</th>
 
 200        <th align="right">Host</th>
 
 201        <td><input name="dbhost" size="30" value="[% HTML.escape(myc_dbhost) %]"></td>
 
 205        <th align="right">Dataset</th>
 
 206        <td><input name="dbname" size="15" value="[% HTML.escape(myc_dbname) %]"></td>
 
 207        <th align="right">Port</th>
 
 208        <td><input name="dbport" size="4" value="[% HTML.escape(myc_dbport) %]"></td>
 
 212        <th align="right">User</th>
 
 213        <td><input name="dbuser" size="15" value="[% HTML.escape(myc_dbuser) %]"></td>
 
 214        <th align="right">Password</th>
 
 215        <td><input name="dbpasswd" type="password" size="10" value="[% HTML.escape(myc_dbpasswd) %]"></td>
 
 219        <td colspan="2"><input type="button" class="submit" onclick="open_connection_test_window();" value="Test connection"></td>
 
 226    <tr><td colspan="2"><hr size="3" noshade></td></tr>
 
 228    <tr class="listheading">
 
 229     <th colspan="2">Group membership</th>
 
 233     <td colspan="2">The user is a member in the following group(s):</td>
 
 237     <td colspan="2">[% FOREACH row = GROUPS %]<a href="admin.pl?action=edit_group&group_id=[% HTML.url(row.id) %]">[% HTML.escape(row.name) %]</a>
 
 238      [% UNLESS loop.last %] | [% END %][% END %]</td>
 
 242    <tr><td colspan="2"><hr size="3" noshade></td></tr>
 
 246   <input name="callback" type="hidden" value="admin.pl?action=list_users">
 
 248   <input type="hidden" name="action" value="dispatcher">
 
 249   <input type="submit" class="submit" name="action_save_user" value="Save">
 
 252    [% FOREACH row = GROUPS %]
 
 253     <input type="hidden" name="new_user_group_ids[]" value="[% HTML.escape(row.id) %]">
 
 255    <input type="hidden" name="new_user_login" id="new_user_login" value="">
 
 256    <input type="hidden" name="action_save_user_as_new" id="action_save_user_as_new" value="">
 
 257    <input type="button" class="submit" id="save_as_new_button" value="Save as new">
 
 258    <input type="submit" class="submit" name="action_delete_user" value="Delete">
 
 259    <input type="hidden" name="edit" value="1">
 
 264  <script type="text/javascript">
 
 266     $(document).ready(function() {
 
 267       $("#save_as_new_button").click(function() {
 
 268         var new_user_login = prompt('Please enter the login for the new user.', '');
 
 269         if (!new_user_login || (new_user_login == ''))
 
 272         $("#action_save_user_as_new").attr('value', '1');
 
 273         $("#new_user_login").attr('value', new_user_login);