[% IF entity_id ; text("Edit Employee") ; ELSE ; text("Add Employee") ; END ; %]
[% PROCESS input element_data = { type = "hidden" name = "target_div" value = 'hr_div' } %] [% PROCESS input element_data = { type = "hidden" name = "form_id" value = form_id } %] [% PROCESS input element_data = { type = "hidden" name = "entity_class" value = entity_class } %] [% PROCESS input element_data = { type = "hidden" name = "entity_id" value = entity_id } %]
[% PROCESS select element_data = { label = text('Salutation') name = 'salutation_id' default_values = [employee.salutation_id] default_blank = 1 options = salutations class = 'salutations' text_attr = 'salutation' value_attr = 'id' } %] [% PROCESS input element_data = { label = text('First Name') name = "first_name" value = employee.first_name type = "text" size = 20 required = 'true' } %] [% PROCESS input element_data = { label = text('Middle Name') name = "middle_name" value = employee.middle_name type = "text" size = 20 } %] [% PROCESS input element_data = { label = text('Last Name') name = "last_name" value = employee.last_name type = "text" size = 20 required = 'true' } %] [% PROCESS input element_data = { label = text('Job Title') name = "role" value = employee.role type = "text" size = 20 } %] [% IF employee.sales; checked = "CHECKED"; ELSE; checked = undef; END; PROCESS input element_data = { label = text('Sales') value = 1 type = "checkbox" checked = checked name = "sales" } %] [% IF employee.is_manager; checked = "CHECKED"; ELSE; checked = undef; END; PROCESS input element_data = { label = text('Manager') value = '1' type = "checkbox" checked = checked name = "is_manager" } %] [% INCLUDE select_country element_data = { text_attr = "name" value_attr = "id" default_values = [employee.country_id] options = country_list name = "country_id" required = 'true' label = text('Country') default_blank = 1 } %] [% PROCESS input element_data = { label = text('Employee Number') value = employee.employeenumber name = "employeenumber" type = "text" size = 20 } %] [% PROCESS select element_data = { label = text('Manager') name = 'manager_id' options = all_managers default_values = [employee.manager_id] text_attr = 'label' value_attr = 'entity_id' default_blank = 1 } %] [% PROCESS input element_data = { label = text('Tax ID/SSN') #' name = "ssn" value = employee.ssn type = "text" class = "tax_id" size = "16" } %] [% PROCESS input element_data = { label = text('DOB') name = "dob" value = employee.dob type = "text" class = "date" size = 10 } %] [% PROCESS input element_data = { label = text('Start Date') name = "start_date" value = employee.start_date type = "text" class = "date" size = 10 } # ' %] [% PROCESS input element_data = { label = text('End Date') name = "end_date" value = employee.end_date class = "date" type = "text" size = 10 } # ' %]
[% PROCESS button element_data = { text = text('Save') class = "submit" type = "submit" name = '__action' value = "save_employee" } %] [% IF manage_users and entity_id; IF user_id %] [[% text('Edit User') %]][% ELSE %] [[% text('Add User') %]][% END; END %]