Exemplo n.º 1
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('timezone');
     $this->setAttribute('method', 'post');
     $name_timezone = new Element\Text('name_timezone');
     $name_timezone->setLabel('Timezone')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($name_timezone);
     $num_timezone = new Element\Text('num_timezone');
     $num_timezone->setLabel('Timezone Number')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($num_timezone);
     $bool_daylight_saving = new Element\Radio('bool_daylight_saving');
     $bool_daylight_saving->setLabel('Daylight Saving')->setLabelAttributes(array('class' => 'checkbox-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_daylight_saving);
     $dt_summer_time_begin = new Element\Text('dt_summer_time_begin');
     $dt_summer_time_begin->setLabel('Summer Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_summer_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true')));
     $this->add($dt_summer_time_begin);
     $dt_winter_time_begin = new Element\Text('dt_winter_time_begin');
     $dt_winter_time_begin->setLabel('Winter Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_winter_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true')));
     $this->add($dt_winter_time_begin);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 2
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-small');
     $this->setAttribute('method', 'post');
     $this->setAttribute('novalidate', true);
     $csrf = new Element\Csrf('csrf');
     $csrf_options = array('csrf_options' => array('timeout' => 1000));
     $csrf->setAttribute('id', 'csrf');
     $csrf->setOptions($csrf_options);
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('id', 'email')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Email address');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('id', 'password')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Password');
     //        $rememberme = new Element\Checkbox('rememberme');
     //        $rememberme->setLabel(' Remember me')
     //                ->setAttribute('id', 'rememberme')
     //                ->setAttribute('class', '')
     //                ->setValue('1');
     $submit = new Element\Submit('submit');
     $submit->setValue('Log in')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-primary btn-block');
     $this->add($csrf);
     $this->add($email);
     $this->add($password);
     //        $this->add($rememberme);
     $this->add($submit);
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct('page');
     //Méthode d'envoie (GET,POST)
     $this->setAttribute('method', 'post');
     //Définition des champs
     //Menu Page
     //        $idField = new Element\Select('menu_id');
     //        $idField->setAttribute('class', 'browser-default');
     //        $idField->setLabel('Menu');
     //        $this->add($idField);
     $idField = new Element\Hidden('structure');
     $idField->setAttribute('id', 'structureform');
     $this->add($idField);
     $idField = new Element\Hidden('block_element');
     $idField->setAttribute('id', 'block-element');
     $this->add($idField);
     //Page Category
     $idField = new Element\Select('ctgr_id');
     $idField->setAttribute('class', 'browser-default');
     $idField->setLabel('Category');
     $this->add($idField);
     //Page Title
     $titleField = new Element\Text('title');
     $titleField->setLabel('Titre');
     $this->add($titleField);
     //Page Content
     $contentField = new Element\Textarea('content');
     $contentField->setLabel('Description');
     $this->add($contentField);
     $submitField = new Element\Submit('submit');
     $submitField->setValue('Envoyer');
     $submitField->setAttributes(array('id' => 'submitbutton', 'class' => 'btn waves-effect waves-light btn-submit-form-page'));
     $this->add($submitField);
 }
Exemplo n.º 4
0
 public function __construct($name = 'mailchimp-sub-form', $options = array())
 {
     parent::__construct($name, $options);
     $firstName = new Element\Text('firstName');
     $firstName->setLabel('First Name');
     $lastName = new Element\Text('lastName');
     $lastName->setLabel('Last Name');
     $email = new Element\Email('email');
     $email->setLabel('Email Address');
     $emailValidator = new Validator\EmailAddress(array('allow' => Validator\Hostname::ALLOW_DNS, 'domain' => true));
     $email->setValidator($emailValidator);
     $privacyPolicy = new Element\Checkbox('privacyPolicy');
     $privacyPolicy->setLabel('I accept the privacy policy and the terms of use');
     $csrf = new Element\Csrf('mcSubCSRF');
     $submit = new Element\Submit('submit');
     $submit->setValue('Subscribe');
     $this->add($firstName);
     $this->add($lastName);
     $this->add($email);
     $this->add($privacyPolicy);
     $this->add($csrf);
     $this->add($submit);
     $inputFilter = $this->getInputFilter();
     $inputFilter->get($firstName->getName())->setAllowEmpty(false)->setRequired(true);
     $inputFilter->get($lastName->getName())->setAllowEmpty(false)->setRequired(true);
 }
Exemplo n.º 5
0
 public function addSubmit($label)
 {
     $submitButton = new Submit('form-submit');
     $submitButton->setValue($label);
     $submitButton->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($submitButton);
 }
 public function __construct($useOldPassword = true)
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'panel-body');
     if ($useOldPassword) {
         $oldPassword = new Password('oldPassword');
         $oldPassword->setLabel('old.password');
         $oldPassword->setAttribute('class', 'form-control');
         $this->add($oldPassword);
     }
     $password = new Password('password');
     $password->setLabel('password');
     $password->setAttribute('class', 'form-control');
     $this->add($password);
     $password2 = new Password('password2');
     $password2->setLabel('repeat.password');
     $password2->setAttribute('class', 'form-control');
     $this->add($password2);
     $captcha = new Captcha('register_captcha');
     $imageAdapter = new Image(['font' => __DIR__ . '/../../fonts/arial.ttf']);
     $imageAdapter->setHeight(100);
     $imageAdapter->setWidth(400);
     $imageAdapter->setFontSize(48);
     $imageAdapter->setDotNoiseLevel(400);
     $imageAdapter->setLineNoiseLevel(40);
     $captcha->setCaptcha($imageAdapter);
     $captcha->setLabel('enter.text.from.the.picture');
     $captcha->setAttribute('class', 'form-control');
     $this->add($captcha);
     $submit = new Submit('save');
     $submit->setValue('save');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($submit);
 }
Exemplo n.º 7
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', '');
     $this->setAttribute('method', 'post');
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     //        $username = new Element\Text('username');
     //        $username->setLabel('User Name')
     //                ->setAttribute('class', 'required inputfullwidth')
     //                ->setAttribute('maxlength', '100')
     //                ->setAttribute('placeholder', 'Username');
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('class', 'required email inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Email');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('class', 'required passValid inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Confirm Password')->setAttribute('class', 'required inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Confirm Password');
     $first_name = new Element\Text('first_name');
     $first_name->setLabel('First Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'First Name');
     $last_name = new Element\Text('last_name');
     $last_name->setLabel('Last Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Last Name');
     $submit = new Element\Submit('submit');
     $submit->setValue('Join Now')->setAttribute('class', 'btn btn-large btn-success btn-hossbrag join-now-home fullwidth');
     $this->add($id);
     $this->add($first_name);
     $this->add($last_name);
     // $this->add($username);
     $this->add($email);
     $this->add($password);
     $this->add($repassword);
     $this->add($submit);
 }
Exemplo n.º 8
0
 public function addElements()
 {
     //-- E-mail current ------------------------------------
     $email_current = new Element\Email('email_current');
     $email_current->setAttribute('readonly', 'true');
     $email_current->setAttribute('class', 'form-control');
     $email_current->setAttribute('id', 'email-old');
     $email_current->setLabel('Current');
     $email_current->setLabelAttributes(array('class' => 'control-label', 'for' => 'email-current'));
     //-- E-mail new ---------------------------------------
     $email = new Element\Email('email');
     $email->setAttribute('placeholder', '*****@*****.**');
     $email->setAttribute('required', 'true');
     $email->setAttribute('class', 'form-control');
     $email->setAttribute('id', 'email');
     $email->setLabel('New');
     $email->setLabelAttributes(array('class' => 'control-label', 'for' => 'email'));
     //-- Submit -------------------------------------
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($email_current);
     $this->add($email);
     $this->add($submit);
 }
Exemplo n.º 9
0
 protected function getSubmit()
 {
     $element = new Submit('logar');
     $element->setValue('Logar');
     $element->setAttributes(array('class' => 'btn btn-primary'));
     return $element;
 }
Exemplo n.º 10
0
 public function __construct(ServiceLocatorInterface $sm)
 {
     parent::__construct('formPost');
     // definindo variáveis
     $em = $sm->get('Doctrine\\ORM\\EntityManager');
     $arrCategorias = array("" => "Selecione");
     $repoCategoria = $em->getRepository('Admin\\Entity\\Categoria');
     $arrCategorias += $repoCategoria->fetchPairs();
     $categoria = new Select('categoria');
     $categoria->setLabel('Categoria')->setAttributes(array('id' => 'categoria', 'class' => 'form-control', 'options' => $arrCategorias));
     $this->add($categoria);
     $nome = new Text('nome');
     $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'class' => 'form-control', 'placeholder' => 'Digite o seu nome'));
     $this->add($nome);
     $descricao = new Textarea('descricao');
     $descricao->setLabel('Descrição')->setAttributes(array('id' => 'descricao', 'class' => 'form-control', 'style' => 'height: 80px', 'placeholder' => 'Digite a descrição do post'));
     $this->add($descricao);
     $conteudo = new Textarea('conteudo');
     $conteudo->setLabel('Conteúdo')->setAttributes(array('id' => 'conteudo', 'class' => 'form-control', 'style' => 'min-height: 150px', 'placeholder' => 'Digite o conteúdo do post'));
     $this->add($conteudo);
     $tags = new Text('tags');
     $tags->setLabel('Tags')->setAttributes(array('id' => 'tags', 'class' => 'form-control', 'placeholder' => 'Digite as tags do conteúdo'));
     $this->add($tags);
     $submit = new Submit('submit');
     $submit->setValue('Salvar');
     $this->add($submit);
 }
Exemplo n.º 11
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('resp');
     $this->setAttribute('method', 'post');
     $name_resp = new Element\Text('name_resp');
     $name_resp->setLabel('Responsibility')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($name_resp);
     $nid_lov_resptype = new Element\Select('nid_lov_resptype');
     $nid_lov_resptype->setLabel('Type')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a type'));
     $this->add($nid_lov_resptype);
     $nid_timezone = new Element\Select('nid_timezone');
     $nid_timezone->setLabel('Time Zone')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a timezone'));
     $this->add($nid_timezone);
     $id_locale = new Element\Select('nid_locale');
     $id_locale->setLabel('Locale')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a locale'));
     $this->add($id_locale);
     $nid_language = new Element\Select('nid_language');
     $nid_language->setLabel('Language')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a language'));
     $this->add($nid_language);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 12
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('orgtype');
     $this->setAttribute('method', 'post');
     $type_organization = new Element\Text('type_organization');
     $type_organization->setLabel('Organization Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($type_organization);
     $genre = new Element\Text('genre');
     $genre->setLabel('Genre')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($genre);
     $bool_unioned = new Element\Radio('bool_unioned');
     $bool_unioned->setLabel('Unioned ?')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_unioned);
     $registered_location = new Element\Text('registered_location');
     $registered_location->setLabel('Registered Location')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($registered_location);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 13
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'panel-body');
     $mail = new Email('email');
     $mail->setLabel('email');
     $mail->setAttribute('class', 'form-control');
     $this->add($mail);
     $captcha = new Captcha('register_captcha');
     $imageAdapter = new Image(['font' => __DIR__ . '/../../fonts/arial.ttf']);
     $imageAdapter->setHeight(100);
     $imageAdapter->setWidth(400);
     $imageAdapter->setFontSize(48);
     $imageAdapter->setDotNoiseLevel(400);
     $imageAdapter->setLineNoiseLevel(40);
     $captcha->setCaptcha($imageAdapter);
     $captcha->setLabel('enter.text.from.the.picture');
     $captcha->setAttribute('class', 'form-control');
     $this->add($captcha);
     $submit = new Submit('send');
     $submit->setValue('send');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($submit);
 }
Exemplo n.º 14
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->setAttribute('id', 'changePasswordForm');
     $this->setAttribute('novalidate', true);
     $this->setAttribute('autocomplete', false);
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     $id->setAttribute('id', 'id');
     $cpassword = new Element\Password('cpassword');
     $cpassword->setLabel('Current Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'cpassword')->setAttribute('placeholder', 'Current Password');
     $password = new Element\Password('password');
     $password->setLabel('New Password')->setAttribute('class', 'required form-control password_strength_check')->setAttribute('id', 'password')->setAttribute('placeholder', 'New Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Re-type Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'repassword')->setAttribute('placeholder', 'Re-type Password');
     $submit = new Element\Submit('submit');
     $submit->setValue('Change Password')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-success btn-block');
     $this->add($id);
     $this->add($cpassword);
     $this->add($password);
     $this->add($repassword);
     //        $this->add($submit);
 }
Exemplo n.º 15
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('lov');
     $this->setAttribute('method', 'post');
     $this->add(new Element\Hidden('type_lov'));
     $new_type_lov = new Element\Text('new_type_lov');
     $new_type_lov->setLabel('List Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($new_type_lov);
     $nid_language = new Element\Select('nid_language');
     $nid_language->setLabel('Language')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a language'));
     $this->add($nid_language);
     $bool_translateable = new Element\Radio('bool_translateable');
     $bool_translateable->setLabel('Translateable')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_translateable);
     $bool_controlbypoxn = new Element\Radio('bool_controlbypoxn');
     $bool_controlbypoxn->setLabel('Control by Poxn')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_controlbypoxn);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 16
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('id', 'searchform');
     $this->setAttribute('method', 'post');
     $username = new Element\Text('username');
     $username->setLabel('Username')->setAttribute('class', 'required form-control')->setAttribute('id', 'username')->setAttribute('placeholder', 'Username');
     $email = new Element\Text('email');
     $email->setLabel('Email')->setAttribute('class', 'required form-control')->setAttribute('id', 'email')->setAttribute('placeholder', 'Email');
     $password = new Element\Text('password');
     $password->setLabel('Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'password')->setAttribute('placeholder', 'Password');
     $salt = new Element\Text('salt');
     $salt->setLabel('Salt')->setAttribute('class', 'required form-control')->setAttribute('id', 'salt')->setAttribute('placeholder', 'Salt');
     $email_check_code = new Element\Text('email_check_code');
     $email_check_code->setLabel('Email Check Code')->setAttribute('class', 'required form-control')->setAttribute('id', 'email_check_code')->setAttribute('placeholder', 'Email Check Code');
     $is_disabled = new Element\Text('is_disabled');
     $is_disabled->setLabel('Is Disabled')->setAttribute('class', 'required form-control')->setAttribute('id', 'is_disabled')->setAttribute('placeholder', 'Is Disabled');
     $created = new Element\Text('created');
     $created->setLabel('Created')->setAttribute('class', 'required form-control')->setAttribute('id', 'created')->setAttribute('placeholder', 'Created');
     $modified = new Element\Text('modified');
     $modified->setLabel('Modified')->setAttribute('class', 'required form-control')->setAttribute('id', 'modified')->setAttribute('placeholder', 'Modified');
     $submit = new Element\Submit('submit');
     $submit->setValue('Search')->setAttribute('class', 'btn btn-success');
     $this->add($username);
     $this->add($email);
     $this->add($password);
     $this->add($salt);
     $this->add($email_check_code);
     $this->add($is_disabled);
     $this->add($created);
     $this->add($modified);
     $this->add($submit);
 }
Exemplo n.º 17
0
 /**
  * Add submit element
  */
 public function addSubmitElement($name = 'save', $label = 'Speichern')
 {
     $element = new Submit($name);
     $element->setValue($label);
     $element->setAttribute('class', 'btn');
     $this->add($element);
 }
Exemplo n.º 18
0
 public function __construct()
 {
     parent::__construct('add');
     $hydrator = new AggregateHydrator();
     $hydrator->add(new PostHydrator());
     $hydrator->add(new CategoryHydrator());
     $this->setHydrator($hydrator);
     $title = new Element\Text('title');
     $title->setLabel('Title');
     $title->setAttribute('class', 'form-control');
     $slug = new Element\Text('slug');
     $slug->setLabel('Slug');
     $slug->setAttribute('class', 'form-control');
     $content = new Element\Textarea('content');
     $content->setLabel('Content');
     $content->setAttribute('class', 'form-control');
     $category = new Element\Select('category_id');
     $category->setLabel('Category');
     $category->setAttribute('class', 'form-control');
     $category->setValueOptions(array(1 => 'WIN', 2 => 'BUILD', 3 => 'SEND', 4 => 'GENERAL'));
     $submit = new Element\Submit('submit');
     $submit->setValue('Add News');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($title);
     $this->add($slug);
     $this->add($content);
     $this->add($category);
     $this->add($submit);
 }
Exemplo n.º 19
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('Attachment');
     $this->add(new Element\Hidden('target_type_object'));
     $this->add(new Element\Hidden('target_id_row'));
     $this->setAttribute('method', 'post');
     $nid_lov_attachmenttype = new Element\Select('nid_lov_attachmenttype');
     $nid_lov_attachmenttype->setLabel('Attachment Type')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('' => 'Select a attachment type'));
     $this->add($nid_lov_attachmenttype);
     $url_or_filepath = new Element\Text('url_or_filepath');
     $url_or_filepath->setLabel('Url or file path')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($url_or_filepath);
     $filename = new Element\Text('filename');
     $filename->setLabel('File Name')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($filename);
     $filesize = new Element\Text('filesize');
     $filesize->setLabel('File Size')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($filesize);
     $mimetype = new Element\Text('mimetype');
     $mimetype->setLabel('Mime Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($mimetype);
     $bool_active = new Element\Radio('bool_active');
     $bool_active->setLabel('Is Active?')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'))->setAttributes(array('class' => 'medwhite'));
     $this->add($bool_active);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 20
0
 public function addElements()
 {
     //-- Profile name --
     $login = new Element\Text('profile_name');
     $login->setAttribute('placeholder', 'profile_name');
     $login->setAttribute('required', 'true');
     $login->setAttribute('class', 'form-control');
     $login->setAttribute('id', 'profile-name');
     $login->setLabel('Profile name');
     $login->setLabelAttributes(array('class' => 'control-label', 'for' => 'profile-name'));
     //-- Password --
     $password = new Element\Password('password');
     $password->setAttribute('placeholder', '*****');
     $password->setAttribute('required', 'true');
     $password->setAttribute('class', 'form-control');
     $password->setAttribute('id', 'password');
     $password->setLabel('Password');
     $password->setLabelAttributes(array('class' => 'control-label', 'for' => 'password'));
     //-- Submit --
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($login);
     $this->add($password);
     $this->add($submit);
 }
 protected function getSubmit()
 {
     $element = new Submit('alterar');
     $element->setValue('Alterar Dados de Acesso');
     $element->setAttributes(array('class' => 'btn btn-primary'));
     return $element;
 }
Exemplo n.º 22
0
 public function __construct($name = null)
 {
     parent::__construct('menus');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('id', 'searchform');
     $this->setAttribute('method', 'post');
     $formValue = $this->formValue();
     $name = new Element\Text('name');
     $name->setLabel('Name')->setAttribute('class', 'required form-control')->setAttribute('id', 'name')->setAttribute('placeholder', 'Name');
     $type = new Element\Select('type');
     $type->setLabel('Type')->setAttribute('class', 'required form-control')->setValueOptions($formValue['type'])->setDisableInArrayValidator(true)->setAttribute('id', 'type')->setAttribute('placeholder', 'Type');
     $resource_id = new Element\Select('resource_id');
     $resource_id->setLabel('Resource')->setAttribute('class', 'required form-control')->setOptions(array())->setDisableInArrayValidator(true)->setAttribute('id', 'resource_id')->setAttribute('placeholder', 'Resource');
     $url = new Element\Text('url');
     $url->setLabel('Url')->setAttribute('class', 'required form-control')->setAttribute('id', 'url')->setAttribute('placeholder', 'Url');
     $target = new Element\Select('target');
     $target->setLabel('Target')->setAttribute('class', 'required form-control')->setValueOptions($formValue['target'])->setDisableInArrayValidator(true)->setAttribute('id', 'target')->setAttribute('placeholder', 'Target');
     $parent_id = new Element\Select('parent_id');
     $parent_id->setLabel('Parent')->setAttribute('class', 'required form-control')->setOptions(array())->setDisableInArrayValidator(true)->setAttribute('id', 'parent_id')->setAttribute('placeholder', 'Parent Id');
     $status = new Element\Select('status');
     $status->setLabel('Status')->setAttribute('class', 'required form-control')->setValueOptions($formValue['status'])->setDisableInArrayValidator(true)->setAttribute('id', 'status')->setAttribute('placeholder', 'Status');
     $submit = new Element\Submit('submit');
     $submit->setValue('Search')->setAttribute('class', 'btn btn-primary');
     $this->add($name);
     $this->add($type);
     $this->add($resource_id);
     $this->add($url);
     $this->add($target);
     $this->add($parent_id);
     $this->add($status);
     $this->add($submit);
 }
Exemplo n.º 23
0
 public function __construct(EntityManager $objectManager)
 {
     parent::__construct('ligue');
     $this->setAttributes(array('method' => 'post', 'id' => 'auth', 'role' => 'form'));
     $this->setInputFilter(new LigueFilter($objectManager));
     $this->setHydrator(new DoctrineObject($objectManager));
     // Id
     $id = new Hidden('id');
     $this->add($id);
     // Nom
     $nom = new Text('nom');
     $nom->setLabel('Nom')->setLabelAttributes(array('class', 'control-label'));
     $nom->setAttributes(array('id' => 'nom', 'class' => 'form-control', 'placeholder' => 'Nom', 'required' => true));
     $this->add($nom);
     // Image
     $image = new File('image');
     $image->setLabel('Image')->setLabelAttributes(array('class', 'control-label'));
     $image->setAttributes(array('id' => 'image', 'class' => 'form-control', 'placeholder' => 'Image'));
     $this->add($image);
     // Date début
     $dateDebut = new Text('dateDebut');
     $dateDebut->setLabel('Début de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateDebut->setAttributes(array('id' => 'dateDebut', 'class' => 'form-control'));
     //$this->add($dateDebut);
     // Date fin
     $dateFin = new Text('dateFin');
     $dateFin->setLabel('Fin de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateFin->setAttributes(array('id' => 'dateFin', 'class' => 'form-control'));
     //$this->add($dateFin);
     // Submit
     $submit = new Submit('submit');
     $submit->setValue('Enregistrer');
     $submit->setAttributes(array('class' => 'btn btn-primary'));
     $this->add($submit);
 }
Exemplo n.º 24
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttributes(array('class' => 'form'));
     // Current Password
     $current = new Element\Password('current_password');
     $current->setLabel('Current Password');
     $current->setAttributes(array('class' => 'form-control input-sm', 'id' => 'current-password-field'));
     $this->add($current);
     // New Password
     $new = new Element\Password('new_password');
     $new->setLabel('New Password');
     $new->setAttributes(array('class' => 'form-control input-sm', 'id' => 'new-password-field'));
     $this->add($new);
     // Confirm Password
     $confirm = new Element\Password('confirm_password');
     $confirm->setLabel('Confirm Password');
     $confirm->setAttributes(array('class' => 'form-control input-sm', 'id' => 'confirm-password-field'));
     $this->add($confirm);
     // Submit button.
     $submit = new Element\Submit('submit');
     $submit->setValue('O.K.');
     $submit->setAttributes(array('id' => 'submit', 'class' => 'btn btn-sm btn-primary'));
     $this->add($submit);
 }
Exemplo n.º 25
0
 public function __construct($name = 'workflowform')
 {
     //         $this->setDbAdapter($dbAdapter);
     // we want to ignore the name passed
     parent::__construct($name);
     $dbAdapter = GlobalAdapterFeature::getStaticAdapter();
     if ($dbAdapter != null) {
         $this->setDbAdapter($dbAdapter);
     } else {
         throw new \Exception('no dbAdapter loaded');
     }
     //         $workflowElement = new Collection('workflow');
     //         $workflowElement->setOptions(array(
     //             'label' => 'Workflow',
     //             'target_element' => array(
     //                 'type' => 'CookingAssist\Form\WorkflowFieldset')
     //         ));
     //         $this->add($workflowElement);
     $this->add(array('name' => 'Id', 'type' => 'Hidden'));
     $this->add(array('name' => 'Title', 'type' => 'Text', 'options' => array('label' => 'Titel')));
     $this->add(array('name' => 'Tipp', 'type' => 'Text', 'options' => array('label' => 'Tipp')));
     $submitElement = new Submit('Submit');
     $submitElement->setValue('Hinzufügen');
     $this->add($submitElement);
 }
Exemplo n.º 26
0
 public function __construct($sm)
 {
     parent::__construct('resetPassword');
     $this->sm = $sm;
     $altesPasswort = new Password('oldPass');
     $altesPasswort->setLabel('LABEL_CHANGE_PASSWORD_OLD_PASS');
     $altesPasswort->setLabelAttributes(array('class' => 'col-sm-2 control-label'));
     $altesPasswort->setAttribute('class', 'form-control');
     $altesPasswort->setAttribute('id', 'oldPass');
     $this->add($altesPasswort);
     $neuesPasswort = new Password('newPass');
     $neuesPasswort->setLabel('LABEL_CHANGE_PASSWORD_NEW_PASS');
     $neuesPasswort->setLabelAttributes(array('class' => 'col-sm-2 control-label'));
     $neuesPasswort->setAttribute('class', 'form-control');
     $neuesPasswort->setAttribute('id', 'newPass');
     $this->add($neuesPasswort);
     $neuesPasswortConfirm = new Password('newPassConfirm');
     $neuesPasswortConfirm->setLabel('LABEL_CHANGE_PASSWORD_NEW_CONFIRM');
     $neuesPasswortConfirm->setLabelAttributes(array('class' => 'col-sm-2 control-label'));
     $neuesPasswortConfirm->setAttribute('class', 'form-control');
     $neuesPasswortConfirm->setAttribute('id', 'newPassConfirm');
     $this->add($neuesPasswortConfirm);
     $submit = new Submit('resetPasswordSubmit');
     $submit->setValue('LABEL_CHANGE_PASSWORD_SUBMIT');
     $submit->setAttribute('class', 'btn btn-default');
     $this->add($submit);
     return $this;
 }
Exemplo n.º 27
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('communication');
     $this->add(new Element\Hidden('id_party'));
     $this->add(new Element\Hidden('nid_commtype'));
     $this->add(new Element\Hidden('access_detail'));
     $this->add(new Element\Hidden('access_form'));
     $this->setAttribute('method', 'post');
     $this->get('access_detail')->setLabel('Account / Number');
     $num_primary_order = new Element\Text('num_primary_order');
     $num_primary_order->setLabel('Number Primary Order')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($num_primary_order);
     $id_address = new Element\Select('id_address');
     $id_address->setLabel('Address')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('' => 'No Address Binded'));
     $this->add($id_address);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
Exemplo n.º 28
0
 public function __construct()
 {
     parent::__construct('personorg');
     $this->setAttribute('method', 'post');
     $this->add(new Element\Hidden('id_person'));
     $this->add(new Element\Hidden('id_organization'));
     $this->add(new Element\Hidden('bool_primary'));
     $this->add(new Element\Hidden('nid_lov_personorgtype'));
     $this->add(new Element\Hidden('dt_begin'));
     $name_title = new Element\Text('name_title');
     $name_title->setLabel('Title')->setAttributes(array('class' => 'largewhite'));
     $this->add($name_title);
     $pnum_primary_order = new Element\Select('num_primary_order');
     $pnum_primary_order->setLabel('Primary Order')->setAttributes(array('class' => 'tinywhite'));
     $this->add($pnum_primary_order);
     $dt_end = new Element\Date('dt_end');
     $dt_end->setLabel('End Date')->setAttributes(array('class' => 'smallwhite', 'type' => 'date', 'id' => 'dt_end'))->setOptions(array('datepickerOptions' => array('changeYear: true', 'changeMonth: true', 'yearRange: "c-100:c+100"')));
     $this->add($dt_end);
     $comment = new Element\Textarea('comment');
     $comment->setLabel('Comment')->setAttributes(array('class' => 'smallwhite'));
     $this->add($comment);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn-success', 'style' => 'margin-right:70px;', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Login')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn-success', 'style' => 'margin: 10px 0 10px 140px'));
     $this->add($submit);
 }
Exemplo n.º 29
0
 public function __construct()
 {
     parent::__construct('delete');
     $this->setAttribute('method', 'post');
     $submit = new Submit('delete');
     $submit->setAttribute('class', 'btn btn-danger');
     $submit->setValue('Delete');
     $this->add($submit);
 }
Exemplo n.º 30
0
 public function __construct($isCreate = false)
 {
     parent::__construct('Pays');
     $this->setAttribute('method', 'post');
     $this->setAttribute('enctype', 'application/x-www-form-urlencoded');
     $id = new Hidden('id');
     $code = new Text('code');
     $code->setLabel('Code :');
     $code->setAttribute('required', true);
     $alpha2 = new Text('alpha2');
     $alpha2->setLabel('Alpha 2 :');
     $alpha2->setAttribute('required', true);
     $alpha3 = new Text('alpha3');
     $alpha3->setLabel('Alpha 3 :');
     $alpha3->setAttribute('required', true);
     $nomEnGb = new Text('nom_en_gb');
     $nomEnGb->setLabel('Nom anglais :');
     $nomEnGb->setAttribute('required', true);
     $nomFrFr = new Text('nom_fr_fr');
     $nomFrFr->setLabel('Nom français :');
     $nomFrFr->setAttribute('required', true);
     $devise = new Text('devise');
     $devise->setLabel('Devise :');
     $tauxTva = new Text('tauxTva');
     $tauxTva->setLabel('Taux TVA :');
     $submit = new Submit('send');
     if ($isCreate) {
         $submit->setValue("Créer");
     } else {
         $submit->setValue("Modifier");
     }
     //$validator = new Zend\Validator\EmailAddress();
     //$result = $validator->isValid($email);
     // Ajout des champs
     $this->add($id);
     $this->add($code);
     $this->add($alpha2);
     $this->add($alpha3);
     $this->add($nomEnGb);
     $this->add($nomFrFr);
     $this->add($devise);
     $this->add($tauxTva);
     $this->add($submit);
 }