2 [%- USE L %][%- USE LxERP -%]
 
   4 [%- INCLUDE 'common/flash.html' %]
 
   6 <h1>[% HTML.escape(title) %]</h1>
 
   8 <form method="post" action="controller.pl" id="form">
 
   9  [% L.hidden_tag("user.id", SELF.user.id) %]
 
  10  [% L.hidden_tag("action", "") %]
 
  11  [%- SET props=SELF.user.config_values %]
 
  13  <h2>[%- LxERP.t8("Settings") %]</h2>
 
  20       <th align="right">[% LxERP.t8('Login Name') %]</th>
 
  21       <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]</td>
 
  24      [%- IF AUTH.can_change_password %]
 
  26       <th align="right">[% LxERP.t8("New Password") %]</th>
 
  27       <td>[% L.input_tag("new_password", "", type="password") %]</td>
 
  32       <th align="right">[% LxERP.t8("Name") %]</th>
 
  33       <td>[% L.input_tag("user.config_values.name", props.name) %]</td>
 
  37       <th align="right">[% LxERP.t8('E-mail') %]</th>
 
  38       <td>[% L.input_tag("user.config_values.email", props.email) %]</td>
 
  42       <th align="right">[% LxERP.t8('Signature') %]</th>
 
  43       <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=35) %]</td>
 
  47       <th align="right">[% LxERP.t8('Phone') %]</th>
 
  48       <td>[% L.input_tag("user.config_values.tel", props.tel) %]</td>
 
  52       <th align="right">[% LxERP.t8('Fax') %]</th>
 
  53       <td>[% L.input_tag("user.config_values.fax", props.fax) %]</td>
 
  61       <th align="right">[% LxERP.t8("Date Format") %]</th>
 
  62       <td>[% L.select_tag("user.config_values.dateformat", SELF.all_dateformats, default=props.dateformat) %]</td>
 
  66       <th align="right">[% LxERP.t8("Number Format") %]</th>
 
  67       <td>[% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat) %]</td>
 
  71       <th align="right">[% LxERP.t8("Dropdown Limit") %]</th>
 
  72       <td>[% L.input_tag("user.config_values.vclimit", props.vclimit) %]</td>
 
  76       <th align="right">[% LxERP.t8("Language") %]</th>
 
  77       <td>[% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode) %]</td>
 
  81       <th align="right">[% LxERP.t8("Stylesheet") %]</th>
 
  82       <td>[% L.select_tag("user.config_values.stylesheet", SELF.all_stylesheets, default=props.stylesheet) %]</td>
 
  86       <th align="right">[% LxERP.t8("Setup Menu") %]</th>
 
  87       <td>[% L.select_tag("user.config_values.menustyle", SELF.all_menustyles, title_key="title", default=props.menustyle) %]</td>
 
  91       <th align="right">[% LxERP.t8("Mandatory Departments") %]</th>
 
  93        [% L.radio_button_tag('user.config_values.mandatory_departments', value='0', id='user.config_values.mandatory_departments_0', label=LxERP.t8('No'),  checked=!props.mandatory_departments) %]
 
  94        [% L.radio_button_tag('user.config_values.mandatory_departments', value='1', id='user.config_values.mandatory_departments_1', label=LxERP.t8('Yes'), checked= props.mandatory_departments) %]
 
 102  <h2>[%- LxERP.t8("Access to clients") %]</h2>
 
 104 [% IF SELF.all_clients.size %]
 
 106   [%- LxERP.t8("This user will have access to the following clients") %]:
 
 109  <div class="clearfix">
 
 110   [% L.select_tag("user.clients[]", SELF.all_clients, id="user_clients", title_key="name", default=SELF.user.clients, default_value_key='id', multiple=1) %]
 
 111   [% L.multiselect2side("user_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this user has access to")) %]
 
 116   [% LxERP.t8("No clients have been created yet.") %]
 
 120  <h2>[%- LxERP.t8("Group membership") %]</h2>
 
 122 [% IF SELF.all_groups.size %]
 
 124   [%- LxERP.t8("This user is a member in the following groups") %]:
 
 127  <div class="clearfix">
 
 128   [% L.select_tag("user.groups[]", SELF.all_groups, id="user_groups", title_key="name", default=SELF.user.groups, default_value_key='id', multiple=1) %]
 
 129   [% L.multiselect2side("user_groups", labelsx => LxERP.t8("All groups"), labeldx => LxERP.t8("Groups this user is a member in")) %]
 
 134   [% LxERP.t8("No groups have been created yet.") %]
 
 138 <hr size="3" noshade>
 
 141  [% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]
 
 143  [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %]
 
 144  [% IF SELF.user.id %]
 
 145   [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
 
 146   [% L.button_tag("submit_with_action('delete_user')", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
 
 152 <script type="text/javascript">
 
 154   function submit_with_action(action) {
 
 155     $("#action").val("Admin/" + action);
 
 159   function save_as_new() {
 
 160     var new_user_login = prompt("[% LxERP.t8("Please enter the login for the new user.") %]", "");
 
 164     $("#user_login").val(new_user_login);
 
 165     $("#user_id").val("");
 
 166     submit_with_action("save_user");