Esempio n. 1
0
 private function get_fields()
 {
     $fields = array(array('type' => 'form', 'action' => '#', 'method' => 'post', 'attributes' => array('class' => 'form form-labeled'), 'id' => 'registrationForm'), array('title' => __('User Type', 'atu'), 'type' => 'select', 'id' => 'role', 'attributes' => array('class' => 'form-control'), 'required' => true, 'value' => '', 'default' => '0', 'options' => array('vendor' => 'Vendor', 'venue' => 'Venue')), array('title' => __('Username', 'atu'), 'type' => 'text', 'id' => 'username', 'placeholder' => '', 'attributes' => array('class' => 'form-control'), 'required' => true, 'value' => $this->get_post_value('username'), 'default' => ''), array('title' => __('Password', 'atu'), 'type' => 'password', 'id' => 'password', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('password'), 'default' => ''), array('title' => __('Confirm Password'), 'type' => 'password', 'id' => 'password_confirmation', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('password_confirmation'), 'default' => ''), array('title' => __('Email', 'atu'), 'type' => 'email', 'id' => 'email', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('email'), 'default' => ''), array('title' => __('Phone', 'atu'), 'type' => 'text', 'id' => 'phone', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'value' => $this->get_post_value('phone'), 'default' => ''), array('title' => __('Mobile', 'atu'), 'type' => 'text', 'id' => 'mobile', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'value' => $this->get_post_value('mobile'), 'default' => ''), array('title' => __('Website', 'atu'), 'type' => 'url', 'id' => 'website', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'value' => $this->get_post_value('website'), 'default' => ''), array('title' => __('Company Name', 'atu'), 'type' => 'text', 'id' => 'company_name', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('company_name'), 'default' => ''), array('title' => __('Description', 'atu'), 'type' => 'textarea', 'id' => 'description', 'attributes' => array('class' => 'form-control', 'rows' => 3, 'cols' => 50), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('description'), 'default' => ''), array('title' => __('First Name', 'atu'), 'type' => 'text', 'id' => 'first_name', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('first_name'), 'default' => ''), array('title' => __('Last Name', 'atu'), 'type' => 'text', 'id' => 'last_name', 'attributes' => array('class' => 'form-control'), 'placeholder' => '', 'required' => true, 'value' => $this->get_post_value('last_name'), 'default' => ''), array('title' => __('City', 'atu'), 'type' => 'select', 'id' => 'city', 'attributes' => array('class' => 'form-control'), 'required' => true, 'value' => '', 'default' => '0', 'options' => WEPN_Helper::city_lists()), array('title' => __('Region', 'atu'), 'type' => 'select', 'id' => 'group', 'attributes' => array('class' => 'form-control'), 'required' => true, 'value' => '', 'default' => '0', 'options' => WEPN_Helper::region_lists()), array('title' => __('Category', 'atu'), 'type' => 'select', 'id' => 'category', 'attributes' => array('class' => 'form-control'), 'required' => true, 'value' => '', 'default' => '0', 'options' => WEPN_Helper::category_list()), array('title' => __('Other Categories', 'atu'), 'type' => 'select', 'id' => 'categories[]', 'attributes' => array('class' => 'form-control', 'multiple' => true), 'required' => true, 'value' => '', 'default' => '0', 'options' => WEPN_Helper::category_list()), array('title' => __('Register', 'atu'), 'type' => 'button', 'id' => 'register', 'attributes' => array('class' => 'btn btn-primary btn-block btn-lg'), 'button_type' => 'submit', 'value' => 'register'), array('type' => 'nonce_field', 'id' => 'wepn_registration_nonce_field', 'action' => 'wepn_registration'), array('type' => 'hidden', 'id' => 'registration_code', 'value' => self::get_current_code(), 'default' => ''), array('type' => 'form-end', 'id' => 'registrationForm'));
     return $fields;
 }