public function __construct($name = null) { parent::__construct('page'); $id_hidden = new Element\Hidden('id'); $id_hidden->setName('id'); $title_text = new Element\Text('title'); $title_text->setLabel('Title'); $title_text->setLabelAttributes(array('class' => 'type_text type_text_short')); $title_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require')); $url_text = new Element\Text('url'); $url_text->setLabel('Url'); $url_text->setLabelAttributes(array('class' => 'type_text type_text_short')); $url_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require')); $text_textarea = new Element\Textarea('text'); $text_textarea->setLabel('Text'); $text_textarea->setLabelAttributes(array('class' => 'type_text')); $text_textarea->setAttributes(array('placeholder' => 'Type something...')); $auto_check = new Element\Checkbox('auto'); $auto_check->setLabel('Automatically'); $auto_check->setLabelAttributes(array('class' => 'type_text type_check')); $auto_check->setUseHiddenElement(true); $auto_check->setCheckedValue("1"); $auto_check->setUncheckedValue("0"); $auto_check->setValue('1'); $meta_text = new Element\Text('meta'); $meta_text->setLabel('Meta'); $meta_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker')); $meta_text->setAttributes(array('class' => 'type_text_input')); $keywords_text = new Element\Text('keywords'); $keywords_text->setLabel('Keywords'); $keywords_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker')); $keywords_text->setAttributes(array('class' => 'type_text_input')); $desc_text = new Element\Text('description'); $desc_text->setLabel('Description'); $desc_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker')); $desc_text->setAttributes(array('class' => 'type_text_input')); $submit_button = new Element\Submit('submit'); $submit_button->setValue('Submit'); $submit_button->setAttributes(array('class' => 'btn btn_white')); $cancel_button = new Element\Submit('cancel'); $cancel_button->setValue('Cancel'); $cancel_button->setAttributes(array('class' => 'btn btn_rozy')); $this->add($id_hidden); $this->add($title_text); $this->add($url_text); $this->add($text_textarea); $this->add($auto_check); $this->add($meta_text); $this->add($keywords_text); $this->add($desc_text); $this->add($submit_button); $this->add($cancel_button); }
public function __construct($name = null) { parent::__construct('links'); $weight_hidden = new Element\Hidden('weight'); $title_text = new Element\Text('name'); $title_text->setLabel('Title'); $title_text->setLabelAttributes(array('class' => 'type_text')); $title_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true)); $url_text = new Element\Url('ref'); $url_text->setLabel('Url'); $url_text->setLabelAttributes(array('class' => 'type_text')); $url_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true)); $description_textarea = new Element\Textarea('description'); $description_textarea->setLabel('Description'); $description_textarea->setLabelAttributes(array('class' => 'type_text')); $description_textarea->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...')); $this->add($weight_hidden); $this->add($title_text); $this->add($url_text); $this->add($description_textarea); }
public function __construct($name = null) { parent::__construct('terms'); $id_hidden = new Element\Hidden('id'); $id_hidden->setName('id'); $orders_radio = new Element\Radio('custom_orders'); $orders_radio->setLabel('Custom orders'); $orders_radio->setValueOptions(array('0' => 'No', '1' => 'Yes')); $shipping_select = new Element\Select('shipping'); $shipping_select->setLabel('Shipping'); $shipping_select->setLabelAttributes(array('class' => 'select f_3_w50')); $shipping_select->setAttributes(array('class' => 'sel_chosen')); $shipping_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your shipping')); $policies_text = new Element\Textarea('wholesale_policies'); $policies_text->setLabel('Wholesale policies'); $policies_text->setLabelAttributes(array('class' => 'type_text')); $policies_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...')); $this->add($id_hidden); $this->add($orders_radio); $this->add($shipping_select); $this->add($policies_text); }
public function __construct($name = null, $options = array()) { parent::__construct(isset($name) ? $name : 'about'); $id_hidden = new Element\Hidden('id'); $id_hidden->setName('id'); $specialty_text = new Element\Text('specialty'); $specialty_text->setLabel('Specialty'); $specialty_text->setLabelAttributes(array('class' => 'type_text')); $specialty_text->setAttributes(array('class' => 'type_text_input')); $proficiency_select = new Element\Select('proficiency_level'); $proficiency_select->setLabel('Proficiency level'); $proficiency_select->setLabelAttributes(array('class' => 'select f_3_w50')); $proficiency_select->setAttributes(array('class' => 'sel_chosen')); $proficiency_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your proficiency')); $about_textarea = new Element\Textarea('about'); $about_textarea->setLabel('About'); $about_textarea->setLabelAttributes(array('class' => 'type_text')); $about_textarea->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require')); $this->add($id_hidden); $this->add($specialty_text); $this->add($proficiency_select); $this->add($about_textarea); }
public function addElements() { //-- Full name -- $full_name = new Element\Text('full_name'); $full_name->setAttribute('placeholder', 'Full Name'); $full_name->setAttribute('class', 'form-control'); $full_name->setAttribute('id', 'full-name'); $full_name->setLabel('Full name'); $full_name->setLabelAttributes(array('class' => 'control-label', 'for' => 'full-name')); //-- Bio -- $bio = new Element\Textarea('bio'); $bio->setAttribute('placeholder', 'Bio'); $bio->setAttribute('class', 'form-control'); $bio->setAttribute('id', 'bio'); $bio->setLabel('Bio'); $bio->setLabelAttributes(array('class' => 'control-label', 'for' => 'bio')); //-- Link skype -- $link_skype = new Element\Text('link_skype'); $link_skype->setAttribute('placeholder', 'skype_name'); $link_skype->setAttribute('class', 'form-control'); $link_skype->setAttribute('id', 'link-skype'); $link_skype->setLabel('Skype'); $link_skype->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-skype')); //-- Link site -- $link_site = new Element\Text('link_site'); $link_site->setAttribute('placeholder', 'http://my-site.com'); $link_site->setAttribute('class', 'form-control'); $link_site->setAttribute('id', 'link-site'); $link_site->setLabel('Link my site'); $link_site->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-site')); //-- Link vkontakte -- $link_vk = new Element\Text('link_vk'); $link_vk->setAttribute('placeholder', 'http://vk.com/user_name'); $link_vk->setAttribute('class', 'form-control'); $link_vk->setAttribute('id', 'link-vk'); $link_vk->setLabel('Link VKontakte'); $link_vk->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-vk')); //-- Link facebook -- $link_fb = new Element\Text('link_fb'); $link_fb->setAttribute('placeholder', 'https://www.facebook.com/user_name'); $link_fb->setAttribute('class', 'form-control'); $link_fb->setAttribute('id', 'link-fb'); $link_fb->setLabel('Link Facebook'); $link_fb->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-fb')); //-- Link twitter -- $link_tw = new Element\Text('link_tw'); $link_tw->setAttribute('placeholder', 'https://twitter.com/user_name'); $link_tw->setAttribute('class', 'form-control'); $link_tw->setAttribute('id', 'link-tw'); $link_tw->setLabel('Link Twitter'); $link_tw->setLabelAttributes(array('class' => 'control-label', 'for' => 'flink-tw')); //-- Password -- $check = new Element\Checkbox('is_active'); $check->setAttribute('class', 'form-control'); $check->setAttribute('id', 'is-active'); $check->setCheckedValue("1"); $check->setUncheckedValue("0"); $check->setLabel('Is active'); $check->setLabelAttributes(array('class' => 'control-label', 'for' => 'is-active')); //-- Submit -- $submit = new Element\Submit('submit'); $submit->setAttribute('class', 'btn btn-success'); $submit->setValue('Send'); // Binding elements $this->add($full_name); $this->add($bio); $this->add($link_skype); $this->add($link_site); $this->add($link_vk); $this->add($link_fb); $this->add($link_tw); $this->add($check); }
public function __construct($name = null) { parent::__construct('services'); $id_hidden = new Element\Hidden('id'); $id_hidden->setName('id'); $tutorial_select = new Element\Select('tutorial_status'); $tutorial_select->setLabel('Tutorial status'); $tutorial_select->setLabelAttributes(array('class' => 'select f_3_w50')); $tutorial_select->setAttributes(array('class' => 'sel_chosen')); $tutorial_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your status')); $members_select = new Element\Textarea('members_special'); $members_select->setLabel('Members Special'); $members_select->setLabelAttributes(array('class' => 'type_text')); $members_select->setAttributes(array('class' => 'type_text_input')); $this->add($id_hidden); $this->add($tutorial_select); $this->add($members_select); $this->add(array('type' => 'Profile\\Form\\AdressesFieldset')); }