[%- USE HTML %] [%- USE L %][%- USE LxERP -%][%- USE JavaScript -%] [%- INCLUDE 'common/flash.html' %]

[% HTML.escape(title) %]

[% L.hidden_tag("user.id", SELF.user.id) %] [% L.hidden_tag("action", "") %] [%- SET props=SELF.user.config_values %]

[%- LxERP.t8("Settings") %]

[%- IF AUTH.can_change_password %] [%- END %]
[% LxERP.t8('Login Name') %] [% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]
[% LxERP.t8("New Password") %] [% L.input_tag("new_password", "", type="password") %]
[% LxERP.t8("Name") %] [% L.input_tag("user.config_values.name", props.name) %]
[% LxERP.t8('E-mail') %] [% L.input_tag("user.config_values.email", props.email) %]
[% LxERP.t8('Signature') %] [% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=35, class="texteditor") %]
[% LxERP.t8('Phone') %] [% L.input_tag("user.config_values.tel", props.tel) %]
[% LxERP.t8('Fax') %] [% L.input_tag("user.config_values.fax", props.fax) %]
[% LxERP.t8("Date Format") %] [% L.select_tag("user.config_values.dateformat", SELF.all_dateformats, default=props.dateformat) %]
[% LxERP.t8("Number Format") %] [% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat) %]
[% LxERP.t8("Language") %] [% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode) %]
[% LxERP.t8("Stylesheet") %] [% L.select_tag("user.config_values.stylesheet", SELF.all_stylesheets, default=props.stylesheet) %]
[% LxERP.t8("Setup Menu") %] [% L.select_tag("user.config_values.menustyle", SELF.all_menustyles, title_key="title", default=props.menustyle) %]
[% LxERP.t8("Mandatory Departments") %] [% 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) %] [% 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) %]

[%- LxERP.t8("CTI settings") %]

[% LxERP.t8("Phone extension") %] [% L.input_tag("user.config_values.phone_extension", props.phone_extension) %]
[% LxERP.t8("Phone password") %] [% L.input_tag("user.config_values.phone_password", props.phone_password) %]

[%- LxERP.t8("Access to clients") %]

[% IF SELF.all_clients.size %]

[%- LxERP.t8("This user will have access to the following clients") %]:

[% L.select_tag("user.clients[]", SELF.all_clients, id="user_clients", title_key="name", default=SELF.user.clients, default_value_key='id', multiple=1) %] [% L.multiselect2side("user_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this user has access to")) %]
[%- ELSE %]

[% LxERP.t8("No clients have been created yet.") %]

[%- END %]

[%- LxERP.t8("Group membership") %]

[% IF SELF.all_groups.size %]

[%- LxERP.t8("This user is a member in the following groups") %]:

[% L.select_tag("user.groups[]", SELF.all_groups, id="user_groups", title_key="name", default=SELF.user.groups, default_value_key='id', multiple=1) %] [% L.multiselect2side("user_groups", labelsx => LxERP.t8("All groups"), labeldx => LxERP.t8("Groups this user is a member in")) %]
[%- ELSE %]

[% LxERP.t8("No groups have been created yet.") %]

[%- END %]

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %] [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %] [% IF SELF.user.id %] [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %] [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %] [%- END %]