Пример #1
0
 function pay_grade($db_value = null)
 {
     $redirect = isset($_POST['hrm_dataAttr']['redirect']) && !empty($_POST['hrm_dataAttr']['redirect']) ? $_POST['hrm_dataAttr']['redirect'] : '';
     if ($db_value != null) {
         $form['id'] = array('type' => 'hidden', 'value' => isset($db_value['id']) ? $db_value['id'] : '');
     }
     $form['name'] = array('label' => __('Name', 'hrm'), 'value' => isset($db_value['name']) ? $db_value['name'] : '', 'type' => 'text', 'extra' => array('data-hrm_validation' => true, 'data-hrm_required' => true, 'data-hrm_required_error_msg' => __('This field is required', 'hrm')));
     $form['action'] = 'ajax_referer_insert';
     $form['table_option'] = 'hrm_pay_grade';
     $form['header'] = 'Pay Grades';
     $form['url'] = $redirect;
     ob_start();
     echo hrm_settings::getInstance()->hidden_form_generator($form);
     $return_value = array('append_data' => ob_get_clean());
     return $return_value;
 }
Пример #2
0
 function personal_info()
 {
     $user_meta_key = array('_gender' => 'gender', '_marital_status' => 'marital_status', '_national_code' => 'national_code', '_birthday' => 'birthday', '_street1' => 'street1', '_street2' => 'street2', '_city_code' => 'city_code', '_state' => 'state', '_zip' => 'zip', '_country_code' => 'country_code', '_work_mobile' => 'work_mobile', '_work_email' => 'work_email');
     $table_option_name = 'hrm_personal_info';
     hrm_settings::getInstance()->update_table_option($table_option_name, $user_meta_key);
 }