/** * Get the employee work_hiring_source * * @return string */ public function get_hiring_source() { if ($this->hiring_source) { $sources = erp_hr_get_employee_sources(); if (array_key_exists($this->hiring_source, $sources)) { return $sources[$this->hiring_source]; } } }
<?php erp_html_form_input(array('label' => __('Employee Type', 'wp-erp'), 'name' => 'work[type]', 'value' => '{{ data.work.type }}', 'class' => 'erp-hrm-select2', 'type' => 'select', 'options' => array('-1' => __('- Select -', 'wp-erp')) + erp_hr_get_employee_types())); ?> </li> <li data-selected="{{ data.work.status }}"> <?php erp_html_form_input(array('label' => __('Employee Status', 'wp-erp'), 'name' => 'work[status]', 'value' => '{{ data.work.status }}', 'class' => 'erp-hrm-select2', 'type' => 'select', 'options' => array('-1' => __('- Select -', 'wp-erp')) + erp_hr_get_employee_statuses())); ?> </li> <# } #> <li data-selected="{{ data.work.hiring_source }}"> <?php erp_html_form_input(array('label' => __('Source of Hire', 'wp-erp'), 'name' => 'work[hiring_source]', 'value' => '{{ data.work.hiring_source }}', 'class' => 'erp-hrm-select2', 'type' => 'select', 'options' => array('-1' => __('- Select -', 'wp-erp')) + erp_hr_get_employee_sources())); ?> </li> <li> <?php erp_html_form_input(array('label' => __('Date of Hire', 'wp-erp'), 'name' => 'work[hiring_date]', 'value' => '{{ data.work.hiring_date }}', 'type' => 'text', 'class' => 'erp-date-field')); ?> </li> <# if ( ! data.id ) { #> <li> <?php erp_html_form_input(array('label' => __('Pay Rate', 'wp-erp'), 'name' => 'work[pay_rate]', 'value' => '{{ data.work.pay_rate }}', 'type' => 'text')); ?>