[% WRAPPER "ui-header.html" stylesheet="ledgersmb.css" include_stylesheet=["system/setup.css"] %] [% PROCESS elements.html %]

## [% text('Database Management Console') %]

[% text('Enter User') %]
[% INCLUDE input element_data = { name = 'database' type = 'hidden' value = database } %]
[% INCLUDE input element_data = { name = 'username' type = 'text' label = text('Username') class = 'username' value = username required = 'required' } %] [% text('Password') %] [% PROCESS input element_data = { name='password' type='password' class = 'password' size='60', attributes = { autocomplete = 'off' } } %] [% text('User creation') %]
[% label_pos = 1 ; PROCESS input element_data = { label = text("Create new user") value = '0' checked = 'CHECKED' name = 'pls_import' type = 'radio' } %]
[% label_pos = 1; PROCESS input element_data = { label = text("Import existing user") value = '1' checked = '' name = 'pls_import' type = 'radio' } ; label_pos = -1; %]
[%- IF notice -%]
[% notice %]
[%- END # IF notice -%]
Import an existing user (from another database)
This username exists because it is being used with another database; using it with the current database requires it to be imported.
The password for both databases will be the same. Providing a password when importing a user, also resets the password for the other companies.
Note that technically any existing PostgreSQL "role" that is to be used as a username needs to be imported this way, regardless of whether it is a username in a different database.
Creates a new user
This username must not be used by any of the other databases. If you want to use a username that is already used with another database, you can do so by selecting the Import option.
[% INCLUDE select element_data = { options = salutations text_attr = 'salutation' value_attr = 'id' default_blank = 1 default_values = [salutation_id] name = 'salutation_id' label = 'Salutation' required = 'required' }; INCLUDE input element_data = { name = 'first_name' class = 'name' type = 'text' size = '15' value = first_name label = text('First Name') required = 'required' }; INCLUDE input element_data = { name = 'last_name' class = 'name' type = 'text' size = '15' value = last_name label = text('Last name') required = 'required' }; INCLUDE input element_data = { name = 'employeenumber' class = 'control_code' type = 'text' size = '15' label = text('Employee Number') value = employeenumber required = 'required' }; INCLUDE input element_data = { name = 'dob' type = 'date' size = '10' label = text('Date of Birth') value = dob required = 'required' }; INCLUDE input element_data = { name = 'ssn' class = 'tax_id' type = 'text' size = '15' label = text('Tax ID/SSN') value = ssn required = 'required' }; INCLUDE select element_data = { options = countries text_attr = 'name' value_attr = 'id' default_blank = 1 default_values = [country_id] name = 'country_id' label = 'Country' required = 'required' }; INCLUDE select element_data = { options = perm_sets text_attr = 'label' value_attr = 'id' name = 'perms' default_blank = 1 default_values = [perms] label = 'Assign Permissions' required = 'required' }; INCLUDE button element_data = { text = text('Create User') #'; name = '__action' value = save_action type = 'submit' class = 'submit' } %]
[% END %]