/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $username = new Zend_Form_Element_Text('username'); // $this->t = Zend_Registry::get('Zend_Translate'); $username->setOptions(array('label' => $this->t('Username'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($username); $password = new Zend_Form_Element_Password('password'); $password->setOptions(array('label' => $this->t('Password'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($password); $authentification = new LoginAttempt(); if ($authentification->canAttemptToLogin() == FALSE) { $captcha = new Zend_Form_Element_Captcha('captcha', array('label' => $this->t("no humain"), 'captcha' => array("captcha" => "Image", "wordLen" => 4, "font" => "font/tahoma.ttf", "height" => 100, "width" => 300, "fontSize" => 50, "imgDir" => "data/captchas", "imgUrl" => "data/captchas"))); $this->addElement($captcha); } $connexion = new Zend_Form_Element_Submit('Connexion'); $connexion->setOptions(array('label' => $this->t('Log In'))); $connexion->setDecorators(array('ViewHelper', array('HtmlTag', array('tag' => 'dd', 'openOnly' => true)))); $this->addElement($connexion); $inscription = new Zend_Form_Element_Submit('inscription'); $inscription->setOptions(array('label' => $this->t('Sign Up'))); $inscription->setDecorators(array('ViewHelper', array('HtmlTag', array('tag' => 'dd', 'closeOnly' => true)))); $this->addElement($inscription); $this->clearDecorators(); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $start_date = new Zend_Form_Element_Text('start_date'); $start_date->setOptions(array('label' => $this->t('Start date'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($start_date); $end_date = new Zend_Form_Element_Text('end_date'); $end_date->setOptions(array('label' => $this->t('End Date'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($end_date); $is_posted = new Zend_Form_Element_Checkbox('is_posted'); $this->addElement($is_posted); $companyName = new Zend_Form_Element_Text('name'); $companyName->setOptions(array('label' => $this->t('Company'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($companyName); $function = new Zend_Form_Element_Text('function'); $function->setOptions(array('label' => $this->t('function'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($function); $mission = new Zend_Form_Element_Textarea('mission'); $mission->setOptions(array('label' => $this->t('mission'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($mission); $city_name = new Zend_Form_Element_Text('city_name'); $city_name->setOptions(array('label' => $this->t('city'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($city_name); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $user = Zend_Auth::getInstance()->getIdentity(); $oldPasswordValidator = new App_Validate_PasswordExists(array('table' => 'backoffice_users', 'field' => 'password', 'treatment' => 'BackofficeUser::hashPassword', 'userPkValue' => $user->id)); $complexityValidator = new Zend_Validate_Regex('/^(?=.*\\d)(?=.*[a-z|A-Z]).{7,}$/'); $complexityValidator->setMessage('The selected password does not meet the required complexity requirements'); $stringLengthValidator = new Zend_Validate_StringLength(); $stringLengthValidator->setMin(7); $stringLengthValidator->setMessage('Your password must be at least 7 characters long'); $passwordHistoryValidator = new App_Validate_NoPasswordExists(array('table' => 'password_log', 'field' => 'password', 'treatment' => 'BackofficeUser::hashPassword', 'userPkField' => 'user_id', 'userPkValue' => $user->id)); $oldPassword = new Zend_Form_Element_Password('old_password'); $oldPassword->setOptions(array('label' => $this->t('Old password'), 'required' => TRUE, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty', $oldPasswordValidator))); $this->addElement($oldPassword); $password = new Zend_Form_Element_Password('password'); $password->setOptions(array('label' => $this->t('New password'), 'required' => TRUE, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty', $stringLengthValidator, $complexityValidator, $passwordHistoryValidator))); $this->addElement($password); $sameAsValidator = new App_Validate_SameAs($password); $sameAsValidator->setMessage('The two passwords do not coincide.', App_Validate_SameAs::NOT_THE_SAME); $retypeNewPassword = new Zend_Form_Element_Password('retype_new_password'); $retypeNewPassword->setOptions(array('label' => $this->t('Retype new password'), 'required' => TRUE, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty', $sameAsValidator))); $this->addElement($retypeNewPassword); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save password'), 'required' => TRUE)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); // $username = new Zend_Form_Element_Text('username'); // $username->setOptions( // array( // 'label' => $this->t('Username'), // 'required' => true, // 'filters' => array( // 'StringTrim', // 'StripTags', // ), // 'validators' => array( // 'NotEmpty', // ), // 'readonly' => 'readonly', // ) // ); // $this->addElement($username); $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $firstname = new Zend_Form_Element_Text('first_name'); $firstname->setOptions(array('label' => $this->t('First name'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($firstname); $lastname = new Zend_Form_Element_Text('last_name'); $lastname->setOptions(array('label' => $this->t('Last name'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($lastname); $email = new Zend_Form_Element_Text('email'); $email->setOptions(array('label' => $this->t('Email address'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty', 'EmailAddress'))); $this->addElement($email); $birthdate = new Zend_Form_Element_Text('birthdate'); $birthdate->setOptions(array('label' => $this->t('birthdate'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($birthdate); $city = new Zend_Form_Element_Text('name'); $city->setOptions(array('label' => $this->t('city'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($city); $phoneNumber = new Zend_Form_Element_Text('phone_number'); $phoneNumber->setOptions(array('label' => $this->t('Phone number'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($phoneNumber); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save profile'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $skills = new Zend_Form_Element_Text('name'); $skills->setOptions(array('label' => $this->t('Skills'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($skills); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method // set the form's method $this->setAction('/contact/listmycontact')->setMethod('post'); $firstName = new Zend_Form_Element_Text('search'); $firstName->setOptions(array('value' => $this->t('Search'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($firstName); $status = new Zend_Form_Element_Radio('status'); $status->setOptions(array('label' => $this->t('Type'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'), 'multiOptions' => array('Reseau' => 'Réseau', 'Mycontact' => 'Mes Contacts'))); $this->addElement($status); $submit = new Zend_Form_Element_Submit('submit_search'); $submit->setOptions(array('label' => $this->t('Search'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $file = new Zend_Form_Element_File('image_url'); $file->setLabel('image')->setAttrib('enctype', 'multipart/form-data')->setDestination(APPLICATION_PATH . '/../public/frontend/images/profil/')->setRequired(false); $this->addElement($file); $profil_description = new Zend_Form_Element_Textarea('profil_description'); $profil_description->setOptions(array('label' => $this->t('description'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($profil_description); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $nameCompany = new Zend_Form_Element_Text('name'); $nameCompany->setOptions(array('label' => $this->t('Raison social'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($nameCompany); $synopsis = new Zend_Form_Element_Textarea('synopsis'); $synopsis->setOptions(array('label' => $this->t('synopsis'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($synopsis); $file = new Zend_Form_Element_File('logo'); $file->setLabel('image')->setAttrib('enctype', 'multipart/form-data')->setDestination(APPLICATION_PATH . '/../public/frontend/images/logo/')->setRequired(false); $this->addElement($file); $rc = new Zend_Form_Element_Text('rc'); $rc->setOptions(array('label' => $this->t('rc'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($rc); $patente = new Zend_Form_Element_Text('patente'); $patente->setOptions(array('label' => $this->t('patente'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($patente); $createDate = new Zend_Form_Element_Text('create_date'); $createDate->setOptions(array('label' => $this->t('create_date'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($createDate); $tel = new Zend_Form_Element_Text('tel'); $tel->setOptions(array('label' => $this->t('tel'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($tel); $fax = new Zend_Form_Element_Text('fax'); $fax->setOptions(array('label' => $this->t('fax'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($fax); $adress = new Zend_Form_Element_Text('adress'); $adress->setOptions(array('label' => $this->t('adress'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($adress); $description = new Zend_Form_Element_Text('description'); $description->setOptions(array('label' => $this->t('description'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($description); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $firstName = new Zend_Form_Element_Text('fistName_son'); $firstName->setOptions(array('value' => $this->t('First name'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($firstName); $lastName = new Zend_Form_Element_Text('lastName_son'); $lastName->setOptions(array('value' => $this->t('Last name'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($lastName); $email = new Zend_Form_Element_Text('email_son'); $email->setOptions(array('value' => $this->t('email'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($email); $submit = new Zend_Form_Element_Submit('submit_sponsor'); $submit->setOptions(array('label' => $this->t('Envoyer mon invitation'), 'required' => true)); $this->addElement($submit); }
/** * Overrides init() in Zend_Form * * @access public * @return void */ public function init() { // init the parent parent::init(); // set the form's method $this->setMethod('post'); $idMember = App_Utilities::getIdMember(); $member_id = new Zend_Form_Element_Hidden('member_id'); $member_id->addFilter('Int')->setValue($idMember); $this->addElement($member_id); $start_date = new Zend_Form_Element_Text('start_date'); $start_date->setOptions(array('label' => $this->t('Start date'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($start_date); $end_date = new Zend_Form_Element_Text('end_date'); $end_date->setOptions(array('label' => $this->t('End Date'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($end_date); $schoolName = new Zend_Form_Element_Text('school'); $schoolName->setOptions(array('label' => $this->t('School Name'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($schoolName); $domain = new Zend_Form_Element_Text('domain'); $domain->setOptions(array('label' => $this->t('domain'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($domain); $degree = new Zend_Form_Element_Text('degree'); $degree->setOptions(array('label' => $this->t('Degree'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($degree); $result = new Zend_Form_Element_Text('result'); $result->setOptions(array('label' => $this->t('Result'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($result); $activity = new Zend_Form_Element_Text('activity'); $activity->setOptions(array('label' => $this->t('Activity'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($activity); $information_add = new Zend_Form_Element_Text('information_add'); $information_add->setOptions(array('label' => $this->t('Additional Information'), 'required' => true, 'filters' => array('StringTrim', 'StripTags'), 'validators' => array('NotEmpty'))); $this->addElement($information_add); $submit = new Zend_Form_Element_Submit('submit'); $submit->setOptions(array('label' => $this->t('Save'), 'required' => true)); $this->addElement($submit); }