Exemplo n.º 1
0
 /**
  * for edit
  * @param int $_branch_no
  */
 public function setEditForm($_branch_no = null)
 {
     parent::__construct('user_edit');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'token_id', 'attributes' => array('type' => 'hidden', 'id' => 'token_id')));
     $this->add(array('name' => 'tmp_user_no', 'attributes' => array('type' => 'hidden', 'id' => 'tmp_user_no')));
     $this->add(array('name' => 'login_id', 'attributes' => array('type' => 'text', 'id' => 'login_id'), 'options' => array('label' => 'Login ID')));
     $this->add(array('name' => 'user_name', 'attributes' => array('type' => 'text', 'id' => 'user_name'), 'options' => array('label' => 'User')));
     $this->add(array('name' => 'section_no', 'type' => 'select', 'attributes' => array('id' => 'section_no'), 'options' => array('label' => 'Section', 'value_options' => $this->getSectionList($_branch_no), 'empty_option' => 'Select section')));
     $this->add(array('name' => 'position_no', 'type' => 'select', 'attributes' => array('id' => 'position_no'), 'options' => array('label' => 'Position', 'value_options' => $this->getPositionList($_branch_no), 'empty_option' => 'Select position')));
     $this->add(array('name' => 'email', 'attributes' => array('type' => 'email', 'id' => 'email'), 'options' => array('label' => 'E-mail')));
     $this->add(array('name' => 'phone', 'attributes' => array('type' => 'phone', 'id' => 'phone'), 'options' => array('label' => 'Phone')));
     $this->add(array('name' => 'timezone', 'type' => 'select', 'attributes' => array('id' => 'timezone'), 'options' => array('label' => 'Timezone', 'value_options' => make_time_list('zone'), 'empty_option' => 'Select timezone')));
     $this->add(array('name' => 'lang_no', 'type' => 'select', 'attributes' => array('id' => 'lang_no'), 'options' => array('label' => 'Language', 'value_options' => $this->getLanguageList(), 'empty_option' => 'Select language')));
     $this->add(array('name' => 'before_login_id', 'attributes' => array('type' => 'hidden', 'id' => 'before_login_id')));
     $this->add(array('name' => 'before_user_name', 'attributes' => array('type' => 'hidden', 'id' => 'before_user_name')));
     $this->add(array('name' => 'before_section_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_section_no')));
     $this->add(array('name' => 'before_position_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_position_no')));
     $this->add(array('name' => 'before_email', 'attributes' => array('type' => 'hidden', 'id' => 'before_email')));
     $this->add(array('name' => 'before_phone', 'attributes' => array('type' => 'hidden', 'id' => 'before_phone')));
     $this->add(array('name' => 'before_timezone', 'attributes' => array('type' => 'hidden', 'id' => 'before_timezone')));
     $this->add(array('name' => 'before_lang_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_lang_no')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Update', 'id' => 'submit', 'class' => 'btn')));
     $this->add(array('name' => 'reset', 'attributes' => array('type' => 'reset', 'value' => 'Reset', 'id' => 'reset', 'class' => 'btn')));
 }
Exemplo n.º 2
0
 /**
  * for edit
  * @param string $_name
  * @param int $_branch_no
  */
 public function setEditForm($_name = null, $_branch_no = null)
 {
     parent::__construct('user_edit');
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'content_form');
     if ('add' == $_name) {
         $this->add(array('name' => 'login_id', 'attributes' => array('type' => 'text', 'id' => 'login_id'), 'options' => array('label' => 'Login ID')));
     }
     $this->add(array('name' => 'token_id', 'attributes' => array('type' => 'hidden', 'id' => 'token_id')));
     $this->add(array('name' => 'user_no', 'attributes' => array('type' => 'hidden', 'id' => 'user_no')));
     $this->add(array('name' => 'update_time', 'attributes' => array('type' => 'hidden', 'id' => 'update_time')));
     $this->add(array('name' => 'user_name', 'attributes' => array('type' => 'text', 'id' => 'user_name'), 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'branch_no', 'type' => 'select', 'attributes' => array('id' => 'branch_no'), 'options' => array('label' => 'Branch', 'value_options' => $this->getBranchList(), 'empty_option' => 'Select branch')));
     $this->add(array('name' => 'section_no', 'type' => 'select', 'attributes' => array('id' => 'section_no'), 'options' => array('label' => 'Section', 'value_options' => $this->getSectionList($_branch_no), 'empty_option' => 'Select section')));
     $this->add(array('name' => 'position_no', 'type' => 'select', 'attributes' => array('id' => 'position_no'), 'options' => array('label' => 'Position', 'value_options' => $this->getPositionList($_branch_no), 'empty_option' => 'Select position')));
     $this->add(array('name' => 'immediate_superior_no', 'type' => 'select', 'attributes' => array('id' => 'immediate-superior-no'), 'options' => array('label' => 'Immediate Superior', 'value_options' => $this->getUserList(), 'empty_option' => 'select immediate superior')));
     $this->add(array('name' => 'email', 'attributes' => array('type' => 'email', 'id' => 'email'), 'options' => array('label' => 'E-mail')));
     $this->add(array('name' => 'phone', 'attributes' => array('type' => 'phone', 'id' => 'phone'), 'options' => array('label' => 'Phone')));
     $this->add(array('name' => 'timezone', 'type' => 'select', 'attributes' => array('id' => 'timezone'), 'options' => array('label' => 'Timezone', 'value_options' => make_time_list('zone'), 'empty_option' => 'Select timezone')));
     $this->add(array('name' => 'lang_no', 'type' => 'select', 'attributes' => array('id' => 'lang_no'), 'options' => array('label' => 'Language', 'value_options' => $this->getLanguageList(), 'empty_option' => 'Select language')));
     $this->add(array('name' => 'valid', 'type' => 'radio', 'options' => array('label' => 'Active', 'value_options' => array('Valid' => array('value' => 1, 'label' => 'Yes', 'attributes' => array('id' => 'valid')), 'Invalid' => array('value' => 0, 'label' => 'No', 'attributes' => array('id' => 'invalid'))))));
     $this->add(array('name' => 'admin', 'type' => 'checkbox', 'options' => array('label' => 'Administrator', 'use_hidden_element' => true, 'checked_value' => 1, 'unchecked_value' => 0)));
     $this->add(array('name' => 'before_user_name', 'attributes' => array('type' => 'hidden', 'id' => 'before_user_name')));
     $this->add(array('name' => 'before_branch_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_branch_no')));
     $this->add(array('name' => 'before_section_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_section_no')));
     $this->add(array('name' => 'before_position_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_position_no')));
     $this->add(array('name' => 'before_email', 'attributes' => array('type' => 'hidden', 'id' => 'before_email')));
     $this->add(array('name' => 'before_phone', 'attributes' => array('type' => 'hidden', 'id' => 'before_phone')));
     $this->add(array('name' => 'before_timezone', 'attributes' => array('type' => 'hidden', 'id' => 'before_timezone')));
     $this->add(array('name' => 'before_lang_no', 'attributes' => array('type' => 'hidden', 'id' => 'before_lang_no')));
     $this->add(array('name' => 'before_valid', 'attributes' => array('type' => 'hidden', 'id' => 'before_valid')));
     $this->add(array('name' => 'before_admin', 'attributes' => array('type' => 'hidden', 'id' => 'before_admin')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Save', 'id' => 'submit')));
     $this->add(array('name' => 'reset', 'attributes' => array('type' => 'reset', 'value' => 'Reset', 'id' => 'reset')));
 }
Exemplo n.º 3
0
 /**
  * for edit
  */
 public function setEditForm()
 {
     parent::__construct('platform_edit');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'token_id', 'attributes' => array('type' => 'hidden', 'id' => 'token_id')));
     $this->add(array('name' => 'branch_no', 'attributes' => array('type' => 'hidden', 'id' => 'branch_no')));
     $this->add(array('name' => 'update_time', 'attributes' => array('type' => 'hidden', 'id' => 'update_time')));
     $this->add(array('name' => 'branch_name', 'attributes' => array('type' => 'text', 'id' => 'branch_name'), 'options' => array('label' => 'Branch')));
     $this->add(array('name' => 'abbr_name', 'attributes' => array('type' => 'text', 'id' => 'abbr_name'), 'options' => array('label' => 'Abbr')));
     $this->add(array('name' => 'timezone', 'type' => 'select', 'attributes' => array('id' => 'timezone'), 'options' => array('label' => 'Timezone', 'value_options' => make_time_list('zone'), 'empty_option' => 'Select timezone')));
     $this->add(array('name' => 'phone', 'attributes' => array('type' => 'tel', 'id' => 'phone'), 'options' => array('label' => 'Tel')));
     $this->add(array('name' => 'address', 'attributes' => array('type' => 'text', 'class' => 'address'), 'options' => array('label' => 'Address')));
     $this->add(array('name' => 'before_branch_name', 'attributes' => array('type' => 'hidden', 'id' => 'before_branch_name')));
     $this->add(array('name' => 'before_abbr_name', 'attributes' => array('type' => 'hidden', 'id' => 'before_abbr_name')));
     $this->add(array('name' => 'before_timezone', 'attributes' => array('type' => 'hidden', 'id' => 'before_timezone')));
     $this->add(array('name' => 'before_phone', 'attributes' => array('type' => 'hidden', 'id' => 'before_phone')));
     $this->add(array('name' => 'before_address', 'attributes' => array('type' => 'hidden', 'id' => 'before_address')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Save', 'id' => 'submit')));
     $this->add(array('name' => 'reset', 'attributes' => array('type' => 'reset', 'value' => 'Reset', 'id' => 'reset')));
 }