/** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     parent::__construct($options);
     $this->setName('comments');
     $commentType = new Zend_Form_Element_Hidden('comment_type');
     $commentType->addFilters(array('StripTags', 'StringTrim'));
     $comment_findID = new Zend_Form_Element_Hidden('contentID');
     $comment_findID->addFilters(array('StripTags', 'StringTrim'));
     $comment_author = new Zend_Form_Element_Text('comment_author');
     $comment_author->setLabel('Enter your name: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addErrorMessage('Please enter a valid name!');
     $comment_author_email = new Zend_Form_Element_Text('comment_author_email');
     $comment_author_email->setLabel('Enter your email address: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addValidator('EmailAddress', false, array('mx' => true))->addErrorMessage('Please enter a valid email address!')->setDescription('* This will not be displayed to the public.');
     $comment_author_url = new Zend_Form_Element_Text('comment_author_url');
     $comment_author_url->setLabel('Enter your web address: ')->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addErrorMessage('Please enter a valid address!')->addValidator('Url')->setDescription('* Not compulsory');
     $comment_content = new Pas_Form_Element_CKEditor('comment_content');
     $comment_content->setLabel('Enter your comment: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $submit = new Zend_Form_Element_Submit('submit');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $status = new Zend_Form_Element_Radio('commentStatus');
     $status->setLabel('Message status:')->addMultiOptions(array('isspam' => 'Set as spam', 'isham' => 'Submit ham?', 'notspam' => 'Spam free'))->setValue('notSpam')->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setOptions(array('separator' => ''));
     $commentApproval = new Zend_Form_Element_Radio('comment_approved');
     $commentApproval->setLabel('Approval:')->addMultiOptions(array('moderation' => 'Moderation', 'approved' => 'Approved'))->setValue('approved')->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setOptions(array('separator' => ''));
     $this->addElements(array($comment_author, $comment_author_email, $comment_content, $comment_author_url, $comment_findID, $commentApproval, $commentType, $status, $hash, $submit));
     $this->addDisplayGroup(array('comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'commentStatus', 'comment_approved', 'contentID', 'comment_type'), 'details');
     $this->details->setLegend('Enter your comments: ');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
Exemplo n.º 2
0
 public function init()
 {
     parent::init();
     $this->setAction('/core/feedback/programme');
     $id = new Zend_Form_Element_Hidden('id');
     $id->setRequired(true)->setLabel('id')->addValidators(array('Int'))->setDecorators(array('Composite'));
     $best = new Zend_Form_Element_Textarea('best_stuff');
     $best->setLabel('Which sessions or presentations were the best – and why?')->setAttrib('class', 'medium')->setDescription('Please limit your comments to 1000 characters')->setRequired(false)->addValidator('StringLength', true, array(1, 5000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer comment', Zend_Validate_StringLength::TOO_LONG => 'Your comment is too long')))->setDecorators(array('Composite'));
     $worst = clone $best;
     $worst->setName('worst_stuff')->setLabel('Which sessions or presentations were the worst – and why?');
     $comments = clone $best;
     $comments->setName('comments')->setLabel('Comments on the programme');
     $this->addElements(array($id, $best, $worst));
     $elements = array('exhibition' => 'How useful did you find the exhibitions and demos?', 'meetings' => 'How useful did you find the meetings / workshops around the conference?', 'lightning' => 'How useful did you find the lightning talks?', 'poster' => 'How useful did you find the poster presentations?');
     // add all elements in loop, since they are all the same
     foreach ($elements as $name => $label) {
         $newSelect = new Zend_Form_Element_Radio($name);
         $newSelect->setLabel($label)->setAttrib('class', 'tiny')->setMultiOptions($this->_getFieldValues('rating', 'feedback'))->setDecorators(array('Composite'));
         $newText = new Zend_Form_Element_Text('remarks_' . $name);
         $newText->setDescription('Comments')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
         $this->addElements(array($newSelect, $newText));
     }
     $this->addElement($comments);
     $this->addElement('submit', 'submit', array('decorators' => $this->_buttonElementDecorator));
 }
Exemplo n.º 3
0
 public function init()
 {
     $this->setAction('/core/submit/new');
     $type = new Zend_Form_Element_MultiCheckbox('submission_type');
     $type->setLabel('')->setRequired(false)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('submission_type'))->setSeparator('<br />')->setDecorators(array('Composite'));
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Title')->setRequired(true)->addValidator('StringLength', true, array(2, 64, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer title', Zend_Validate_StringLength::TOO_LONG => 'Your title is too long')))->setAttrib('class', 'medium')->setDescription('Must be between 2 and 64 characters')->setAttrib('maxLength', 64)->setDecorators(array('Composite'));
     $audience = new Zend_Form_Element_Radio('target_audience');
     $audience->setLabel('Please mark the target audience for your presentation')->setRequired(true)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('target_audience'))->setSeparator('<br />')->setDecorators(array('Composite'));
     $publish = new Zend_Form_Element_Radio('publish_paper');
     $publish->setLabel('Please indicate whether you wish to prepare a full paper for possible publication')->setRequired(true)->setAttrib('class', 'tiny')->addMultiOptions($this->_getFieldValues('publish_paper', 'submit'))->setSeparator('<br />')->setDecorators(array('Composite'));
     $topicModel = new Core_Model_Topic();
     $topicsForSelect = $topicModel->getTopicsForSelect();
     $topicsel = new Zend_Form_Element_MultiCheckbox('topic');
     $topicsel->setLabel('Topic')->setRequired(false)->setAttrib('class', 'tiny')->setMultiOptions($topicsForSelect)->setSeparator('<br />')->setDecorators(array('Composite'));
     $keywords = new Zend_Form_Element_Text('keywords');
     $keywords->setLabel('Keywords')->setRequired(false)->addValidator('StringLength', true, array(2, 500, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide longer keywords', Zend_Validate_StringLength::TOO_LONG => 'Your keywords are too long')))->setAttrib('class', 'medium')->setDescription('Must be between 2 and 500 characters')->setDecorators(array('Composite'));
     $abstract = new Zend_Form_Element_Textarea('abstract');
     $abstract->setLabel('Submission Summary (If your submission is accepted, this will be publicly visible!)')->setAttrib('class', 'small')->setDescription('Must be between 5 and 2000 characters')->setRequired(false)->addValidator('StringLength', true, array(5, 2000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer abstract', Zend_Validate_StringLength::TOO_LONG => 'Your abstract is too long')))->setDecorators(array('Composite'));
     $comment = new Zend_Form_Element_Textarea('comment');
     $comment->setLabel('Information for Reviewers')->setAttrib('class', 'small')->setDescription('Must be between 5 and 1000 characters')->setRequired(false)->addValidator('StringLength', true, array(5, 1000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer description', Zend_Validate_StringLength::TOO_LONG => 'Your description is too long')))->setDecorators(array('Composite'));
     $file = new TA_Form_Element_MagicFile('file');
     $file->setLabel('Your submission (File must be pdf and no bigger than 10Mb) *')->setRequired(false)->addDecorators($this->_magicFileElementDecorator)->addValidators(array(array('Count', true, 1), array('Size', true, 10000000), array('Extension', true, array('pdf', 'case' => true)), array('MimeType', false, array('application/pdf'))));
     $file->getValidator('Extension')->setMessage('Only pdf files are allowed!');
     $subform = new Zend_Form_SubForm();
     $subform->setDecorators(array('FormElements'));
     $subform->addElements(array($type, $file, $title, $audience, $topicsel, $keywords, $abstract, $comment));
     $this->addSubForm($subform, 'submission');
     $this->addElement('submit', 'submit', array('label' => 'Submit', 'decorators' => $this->_buttonElementDecorator));
 }
Exemplo n.º 4
0
    public function init()
    {
        $this->setMethod('post');

        $canVote = new Zend_Form_Element_Radio('can_vote');
        $canVote->setLabel('Można głosować: ')
            ->addMultiOptions(
                array('1' => 'Tak', '0' => 'Nie')
            )
            ->setSeparator('');

        $this->addElement($canVote, 'can_vote');

        $canEnter = new Zend_Form_Element_Radio('can_enter');
        $canEnter->setLabel('Można zgłaszać zdjęcia: ')
            ->addMultiOptions(
                array('1' => 'Tak', '0' => 'Nie')
            )
            ->setSeparator('');

        $this->addElement($canEnter, 'can_enter');

        $save = new Zend_Form_Element_Submit('save');
        $save->setLabel('Zapisz');
        $save->setAttrib('class', 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only');

        $this->addElement($save);
    }
Exemplo n.º 5
0
 public function __construct($options = null)
 {
     $reeces = new Reeces();
     $reeces_options = $reeces->getRevTypes();
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('reversetype');
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Reverse type inscription: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter an inscription.')->setDecorators($decorators)->setAttrib('size', 70);
     $translation = new Zend_Form_Element_Text('translation');
     $translation->setLabel('Translation: ')->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a translation.')->setDecorators($decorators)->setAttrib('size', 70);
     $description = new Zend_Form_Element_Text('description');
     $description->setLabel('Description: ')->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a translation.')->setDecorators($decorators)->setAttrib('size', 70);
     $gendate = new Zend_Form_Element_Text('gendate');
     $gendate->setLabel('General date for reverse type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->addErrorMessage('You must enter a general date for this reverse type.')->setDecorators($decorators)->setAttrib('size', 30);
     $reeceID = new Zend_Form_Element_Select('reeceID');
     $reeceID->setLabel('Reece period: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL, 'Choose reason' => $reeces_options))->addValidator('InArray', false, array(array_keys($reeces_options)))->setDecorators($decorators);
     $common = new Zend_Form_Element_Radio('common');
     $common->setLabel('Is this reverse type commonly found: ')->setRequired(false)->addMultiOptions(array('1' => 'Yes', '2' => 'No'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''))->setDecorators($decorators);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElements(array($type, $gendate, $description, $translation, $reeceID, $common, $submit, $hash));
     $this->addDisplayGroup(array('type', 'translation', 'description', 'gendate', 'reeceID', 'common', 'submit'), 'details');
     $this->details->setLegend('Reverse type details: ');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->setLegend('Issuer or ruler details: ');
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
 }
Exemplo n.º 6
0
 public function init()
 {
     // Set form options
     $this->setName('productBasicInfo')->setAction(SITE_ROOT . '/productlisting/' . $this->postAction)->setMethod('post');
     //name
     $name = new Zend_Form_Element_Text('name');
     $name->setRequired(true)->addValidator('Alnum')->addvalidator('StringLength', false, array(4, 150));
     //brand
     $brand = new Zend_Form_Element_Select('brand');
     $brand->setRequired(true)->addValidator('Alnum');
     //social_usage
     $socialUsage = new Zend_Form_Element_Checkbox('socialUsage');
     $competativeUsage = new Zend_Form_Element_Checkbox('competativeUsage');
     $price = new Zend_form_Element_Text('price');
     $price->setRequired(true)->addValidator(new Zend_Validate_Float(), true);
     //domestic shipping rate
     $domesticShippingRate = new Zend_Form_Element_Text('domesticShippingRate');
     $domesticShippingRate->setRequired(true)->addValidator(new Zend_Validate_Float(), true);
     //international shipping rate
     $internationalShippingRate = new Zend_Form_Element_Text('internationalShippingRate');
     $internationalShippingRate->setRequired(true)->addValidator(new Custom_Validators_Price(), true);
     //backordertime
     $backorderTime = new Zend_Form_Element_Text('backorderTime');
     //returnable
     $return = new Zend_Form_Element_Radio('return');
     $return->setLabel('Return:')->addMultiOptions(array('returnable' => 'Returnable', 'Unreturnable' => 'Not returnable'))->setSeparator(" ")->setAttrib("checked", "checked");
     //videos
     $video = new Zend_Form_Element_Text('videoYoutube');
     // Add all the elements to the form
     $this->addElement($name)->addElement($brand)->addElement($socialUsage)->addElement($competativeUsage)->addElement($price)->addElement($domesticShippingRate)->addElement($internationalShippingRate)->addElement($backorderTime)->addElement($return)->addElement($video);
 }
Exemplo n.º 7
0
 public function __construct($forSearch = false)
 {
     parent::__construct();
     if ($forSearch) {
         $radioKind = new Zend_Form_Element_Radio('kind');
         $radioKind->addMultiOptions(array('and' => 'and', 'or' => 'or'));
         $radioKind->setValue('and');
         $radioKind->setLabel('Search field combination:');
         $radioKind->setRequired(true);
         $this->addElement($radioKind);
     }
     $this->addElement('hidden', CalibrationExercise::COL_ID, array('required' => true));
     $this->addElement('hidden', CalibrationExercise::COL_WORKSHOP_ID, array('required' => true));
     $valiAlphaWhiteSpace = new Zend_Validate_Alpha(true);
     $valiAlnumWhiteSpace = new Zend_Validate_Alnum(true);
     $this->addElement('text', CalibrationExercise::COL_NAME, array('label' => 'Calibration exercise name:', 'required' => true, 'validators' => array($valiAlnumWhiteSpace)));
     $this->addElement('text', CalibrationExercise::COL_DESCRIPTION, array('label' => 'Description:', 'required' => true, 'validators' => array($valiAlnumWhiteSpace)));
     $this->addElement(new Default_Form_Element_KeyTableSelect(CalibrationExercise::COL_KEY_TABLE_ID, array('label' => 'Protocol:', 'required' => true, 'validators' => array($valiAlnumWhiteSpace))));
     $this->addElement(new Default_Form_Element_ExpertiseSelect(CalibrationExercise::COL_EXPERTISE_ID, array('label' => 'Expertise:', 'required' => true, 'validators' => array($valiAlnumWhiteSpace))));
     $this->addElement('checkbox', CalibrationExercise::COL_COMPAREABLE, array('label' => 'Show comparable other user/group annotations/references:', 'required' => true));
     $this->addElement('checkbox', CalibrationExercise::COL_RANDOMIZED, array('label' => 'Allow adding images to image set at random:', 'required' => true));
     $this->addElement('submit', 'save', array('label' => 'Save'));
     $this->addElement('hidden', 'Token');
     $this->addElement('hidden', CalibrationExercise::COL_IS_STOPPED);
 }
Exemplo n.º 8
0
 public function startFrom()
 {
     $setting = $this->setting;
     if (Application_Model_Preference::GetPlanLevel() == 'disabled') {
         $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
         $output_sound_device->setLabel('Hardware Audio Output')->setRequired(false)->setValue($setting['output_sound_device'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper'));
         if (Application_Model_Preference::GetEnableStreamConf() == "false") {
             $output_sound_device->setAttrib("readonly", true);
         }
         $this->addElement($output_sound_device);
         $output_types = array("ALSA" => "ALSA", "AO" => "AO", "OSS" => "OSS", "Portaudio" => "Portaudio", "Pulseaudio" => "Pulseaudio");
         $output_type = new Zend_Form_Element_Select('output_sound_device_type');
         $output_type->setLabel("Output Type")->setMultiOptions($output_types)->setValue($setting['output_sound_device_type'])->setDecorators(array('ViewHelper'));
         if ($setting['output_sound_device'] != "true") {
             $output_type->setAttrib("disabled", "disabled");
         }
         $this->addElement($output_type);
     }
     $icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
     $icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata')->setRequired(false)->setValue($setting['icecast_vorbis_metadata'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper'));
     if (Application_Model_Preference::GetEnableStreamConf() == "false") {
         $icecast_vorbis_metadata->setAttrib("readonly", true);
     }
     $this->addElement($icecast_vorbis_metadata);
     $stream_format = new Zend_Form_Element_Radio('streamFormat');
     $stream_format->setLabel('Stream Label:');
     $stream_format->setMultiOptions(array("Artist - Title", "Show - Artist - Title", "Station name - Show name"));
     $stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat());
     $stream_format->setDecorators(array('ViewHelper'));
     $this->addElement($stream_format);
 }
Exemplo n.º 9
0
 public function init()
 {
     $this->setMethod("post");
     $title = new Zend_Form_Element_Text("title");
     $title->setAttrib("placeholder", "Title");
     $title->setAttrib("class", "form-control");
     $title->setLabel("Title: ");
     $title->setRequired();
     $body = new Zend_Form_Element_Textarea("body");
     $body->setAttrib("class", "form-control");
     $body->setAttrib("placeholder", "Write body here....");
     $body->setLabel("Body: ");
     $body->setAttrib("rows", "5");
     $body->setAttrib("cols", "55");
     $body->setRequired();
     $picture = new Zend_Form_Element_File('picture');
     $picture->setLabel("Picture:");
     $picture->setRequired();
     $picture->setDestination('/var/www/html/RNR/public/images/thread');
     $stick = new Zend_Form_Element_Radio("stick");
     $stick->setLabel("Sticky:");
     $stick->addMultiOption("on", "on");
     $stick->addMultiOption("off", "off");
     $stick->setRequired();
     $id = new Zend_Form_Element_Hidden("id");
     $submit = new Zend_Form_Element_Submit("Submit");
     $submit->setAttrib("class", "btn btn-primary");
     $submit->setLabel("Save");
     $rest = new Zend_Form_Element_Submit('Rest');
     $rest->setAttrib("class", "btn btn-info");
     $this->addElements(array($id, $title, $body, $picture, $stick, $submit, $rest));
 }
 public function __construct($options = null)
 {
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('tag' => '', 'placement' => 'append')), array('Errors', array('placement' => 'append', 'tag' => 'li')), array('Label', array('separator' => ' ', 'requiredSuffix' => ' *')), array('HtmlTag', array('tag' => 'li')));
     $this->setName('comments');
     $comment_author_IP = new Zend_Form_Element_Hidden('comment_author_IP');
     $comment_author_IP->removeDecorator('HtmlTag')->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setValue($_SERVER['REMOTE_ADDR'])->addValue('Ip');
     $comment_agent = new Zend_Form_Element_Hidden('comment_agent');
     $comment_agent->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setValue($_SERVER['HTTP_USER_AGENT'])->setRequired(false)->addFilters(array('StripTags', 'StringTrim'));
     $comment_findID = new Zend_Form_Element_Hidden('comment_findID');
     $comment_findID->addFilters(array('StripTags', 'StringTrim'))->setDecorators(array(array('ViewHelper'), array('Description', array('tag' => '')), array('Errors'), array('HtmlTag', array('tag' => 'p')), array('Label', array('tag' => ''))));
     $comment_author = new Zend_Form_Element_Text('comment_author');
     $comment_author->setLabel('Enter your name: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addErrorMessage('Please enter a valid name!')->setDecorators($decorators);
     $comment_author_email = new Zend_Form_Element_Text('comment_author_email');
     $comment_author_email->setLabel('Enter your email address: ')->setDecorators($decorators)->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addValidator('EmailAddress', false, array('mx' => true))->addErrorMessage('Please enter a valid email address!')->setDescription('* This will not be displayed to the public.');
     $comment_author_url = new Zend_Form_Element_Text('comment_author_url');
     $comment_author_url->setLabel('Enter your web address: ')->setDecorators($decorators)->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addErrorMessage('Please enter a valid address!')->addValidator('Url')->setDescription('* Not compulsory');
     $comment_content = new Pas_Form_Element_RTE('comment_content');
     $comment_content->setLabel('Enter your comment: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $approval = new Zend_Form_Element_Radio('comment_approval');
     $approval->setLabel('What would you like to do? ')->addMultiOptions(array('spam' => 'Set as spam', 'ham' => 'Submit ham?', 'approved' => 'Publish it?', 'delete' => 'Delete it?'))->setValue('approved')->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setOptions(array('separator' => ''))->setDecorators($decorators);
     $this->addElements(array($comment_author_IP, $comment_agent, $comment_author, $comment_author_email, $comment_content, $comment_author_url, $comment_findID, $approval, $submit));
     $this->addDisplayGroup(array('comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_approval', 'comment_findID'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('HtmlTag');
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->setLegend('Enter your comments: ');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
Exemplo n.º 11
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $reeces = new Reeces();
     $reeces_options = $reeces->getRevTypes();
     parent::__construct($options);
     $this->setName('reversetype');
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Reverse type inscription: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter an inscription.')->setAttrib('size', 70);
     $translation = new Zend_Form_Element_Text('translation');
     $translation->setLabel('Translation: ')->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a translation.')->setAttrib('size', 70);
     $description = new Zend_Form_Element_Text('description');
     $description->setLabel('Description: ')->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a translation.')->setAttrib('size', 70);
     $gendate = new Zend_Form_Element_Text('gendate');
     $gendate->setLabel('General date for reverse type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a general date for this reverse type.')->setAttrib('size', 30);
     $reeceID = new Zend_Form_Element_Select('reeceID');
     $reeceID->setLabel('Reece period: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose a Reece period', 'Available Reece period' => $reeces_options))->addValidator('InArray', false, array(array_keys($reeces_options)));
     $common = new Zend_Form_Element_Radio('common');
     $common->setLabel('Is this reverse type commonly found: ')->setRequired(false)->addMultiOptions(array('1' => 'Yes', '2' => 'No'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setOptions(array('separator' => ''));
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $this->addElements(array($type, $gendate, $description, $translation, $reeceID, $common, $submit, $hash));
     $this->addDisplayGroup(array('type', 'translation', 'description', 'gendate', 'reeceID', 'common', 'submit'), 'details');
     $this->details->setLegend('Reverse type details: ');
     $this->details->setLegend('Issuer or ruler details: ');
     parent::init();
 }
 public function init()
 {
     // create elements
     $userId = new Zend_Form_Element_Hidden('id');
     $mail = new Zend_Form_Element_Text('email');
     $name = new Zend_Form_Element_Text('name');
     $radio = new Zend_Form_Element_Radio('radio');
     $file = new Zend_Form_Element_File('file');
     $multi = new Zend_Form_Element_MultiCheckbox('multi');
     $captcha = new Zend_Form_Element_Captcha('captcha', array('captcha' => 'Figlet'));
     $submit = new Zend_Form_Element_Button('submit');
     $cancel = new Zend_Form_Element_Button('cancel');
     // config elements
     $mail->setLabel('Mail:')->setAttrib('placeholder', 'data please!')->setRequired(true)->setDescription('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fringilla purus eget ante ornare vitae iaculis est varius.')->addValidator('emailAddress');
     $name->setLabel('Name:')->setRequired(true);
     $radio->setLabel('Radio:')->setMultiOptions(array('1' => PHP_EOL . 'test1', '2' => PHP_EOL . 'test2'))->setRequired(true);
     $file->setLabel('File:')->setRequired(true)->setDescription('Check file upload');
     $multiOptions = array('view' => PHP_EOL . 'view', 'edit' => PHP_EOL . 'edit', 'comment' => PHP_EOL . 'comment');
     $multi->setLabel('Multi:')->addValidator('Alpha')->setMultiOptions($multiOptions)->setRequired(true);
     $captcha->setLabel('Captcha:')->setRequired(true)->setDescription("This is a test");
     $submit->setLabel('Save')->setAttrib('type', 'submit');
     $cancel->setLabel('Cancel');
     // add elements
     $this->addElements(array($userId, $mail, $name, $radio, $file, $captcha, $multi, $submit, $cancel));
     // add display group
     $this->addDisplayGroup(array('email', 'name', 'radio', 'multi', 'file', 'captcha', 'submit', 'cancel'), 'users');
     // set decorators
     EasyBib_Form_Decorator::setFormDecorator($this, EasyBib_Form_Decorator::BOOTSTRAP_MINIMAL, 'submit', 'cancel');
 }
Exemplo n.º 13
0
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('accountupgrades');
        $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
        $researchOutline = new Pas_Form_Element_RTE('researchOutline');
        $researchOutline->setLabel('Research outline: ')->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilter('StringTrim')->addFilter('BasicHtml')->addFilter('EmptyParagraph')->addFilter('WordChars')->addErrorMessage('Outline must be present.')->setDescription('Use this textarea to tell us whether you want to become a 
		research level user and why. We would also like to know the probable length of time 
		for this project so that we can inform our research board of progress. 
		We need a good idea as we have to respect privacy of findspots and landowner/finder personal data');
        $reference = $this->addElement('Text', 'reference', array('label' => 'Please provide a referee:', 'size' => '40', 'description' => 'We ask you to provide a referee who can substantiate your request for higher level access. 
		Ideally they will be an archaeologist of good standing.'))->reference;
        $reference->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim');
        $reference->setDecorators($decorators);
        $referenceEmail = $this->addElement('Text', 'referenceEmail', array('label' => 'Please provide an email address for your referee:', 'size' => '40'))->referenceEmail;
        $referenceEmail->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('EmailAddress');
        $referenceEmail->setDecorators($decorators);
        $already = new Zend_Form_Element_Radio('already');
        $already->setLabel('Is your topic already listed on our research register?: ')->addMultiOptions(array(1 => 'Yes it is', 0 => 'No it isn\'t'))->setRequired(true)->setOptions(array('separator' => ''))->setDecorators($decorators);
        //Submit button
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submit')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->setLabel('Submit request');
        $this->addElements(array($researchOutline, $submit, $already));
        $this->addDisplayGroup(array('researchOutline', 'reference', 'referenceEmail', 'already'), 'details')->removeDecorator('HtmlTag');
        $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
        $this->details->removeDecorator('DtDdWrapper');
        $this->details->removeDecorator('HtmlTag');
        $this->details->setLegend('Details: ');
        $this->addDisplayGroup(array('submit'), 'submit');
    }
Exemplo n.º 14
0
 public function __construct()
 {
     parent::__construct();
     $radioKind = new Zend_Form_Element_Radio('kind');
     $radioKind->addMultiOptions(array('and' => 'and', 'or' => 'or'));
     $radioKind->setValue('and');
     $radioKind->setLabel('Search field combination:');
     $radioKind->setRequired(true);
     $this->addElement($radioKind);
     $fishSampleCode = new Zend_Form_Element_Text(Fish::COL_SAMPLE_CODE);
     $fishSampleCode->setLabel('Fish Sample Code:');
     //---------------------------------------------------------
     //read the available image attributes from attribute descriptor+group image
     $metadata = new Default_MetaData();
     $fishRowSetArray = $metadata->getAttributesComplete('fish');
     //----------------------------------------------------------
     $this->addDynamicElements($fishRowSetArray, true);
     $this->addElement($fishSampleCode);
     $this->addElement('submit', 'submit', array('label' => 'search'));
     $this->addElement('hidden', 'Token');
     $this->setElementFilters(array('StringTrim'));
     //#####################new###################################
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table', 'class' => 'dynamic_form')), array('Description', array('placement' => 'prepend')), 'Form'));
     $this->setElementDecorators(array('ViewHelper', 'Errors', array('decorator' => array('td' => 'HtmlTag'), 'options' => array('tag' => 'td')), array('Label', array('tag' => 'td')), array('decorator' => array('tr' => 'HtmlTag'), 'options' => array('tag' => 'tr'))));
     $this->setSubFormDecorators(array('FormElements', array('HtmlTag', array('tag' => 'tr'))));
     foreach ($this->getSubForms() as $index => $subform) {
         $subform->setElementDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array('Label', array('tag' => 'td'), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))));
     }
     $this->submit->setDecorators(array(array('decorator' => 'ViewHelper', 'options' => array('helper' => 'formSubmit')), array('decorator' => array('td' => 'HtmlTag'), 'options' => array('tag' => 'td', 'colspan' => 2)), array('decorator' => array('tr' => 'HtmlTag'), 'options' => array('tag' => 'tr'))));
     //###########################################################
 }
Exemplo n.º 15
0
 public function init()
 {
     $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled' ? false : true;
     $this->isSaas = $isSaas;
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas))));
     $defaultFade = Application_Model_Preference::GetDefaultFade();
     if ($defaultFade == "") {
         $defaultFade = '0.500000';
     }
     //Station name
     $this->addElement('text', 'stationName', array('class' => 'input_text', 'label' => 'Station Name', 'required' => false, 'filters' => array('StringTrim'), 'value' => Application_Model_Preference::GetStationName(), 'decorators' => array('ViewHelper')));
     //Default station fade
     $this->addElement('text', 'stationDefaultFade', array('class' => 'input_text', 'label' => 'Default Fade (s):', 'required' => false, 'filters' => array('StringTrim'), 'validators' => array(array('regex', false, array('/^[0-9]{1,2}(\\.\\d{1,6})?$/', 'messages' => 'enter a time in seconds 0{.000000}'))), 'value' => $defaultFade, 'decorators' => array('ViewHelper')));
     $third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
     $third_party_api->setLabel('Allow Remote Websites To Access "Schedule" Info?<br> (Enable this to make front-end widgets work.)');
     $third_party_api->setMultiOptions(array("Disabled", "Enabled"));
     $third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
     $third_party_api->setDecorators(array('ViewHelper'));
     $this->addElement($third_party_api);
     /* Form Element for setting the Timezone */
     $timezone = new Zend_Form_Element_Select("timezone");
     $timezone->setLabel("Timezone");
     $timezone->setMultiOptions($this->getTimezones());
     $timezone->setValue(Application_Model_Preference::GetTimezone());
     $timezone->setDecorators(array('ViewHelper'));
     $this->addElement($timezone);
     /* Form Element for setting which day is the start of the week */
     $week_start_day = new Zend_Form_Element_Select("weekStartDay");
     $week_start_day->setLabel("Week Starts On");
     $week_start_day->setMultiOptions($this->getWeekStartDays());
     $week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
     $week_start_day->setDecorators(array('ViewHelper'));
     $this->addElement($week_start_day);
 }
Exemplo n.º 16
0
 public function init()
 {
     // profissional_beleza_id
     $profissional_beleza_id = new Zend_Form_Element_Radio("profissional_beleza_id");
     $profissional_beleza_id->setLabel("Selecione o profissional desejado: ");
     $profissional_beleza_id->setRegisterInArrayValidator(false);
     $profissional_beleza_id->setRequired();
     $profissional_beleza_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // agenda_data
     $agenda_data = new Zend_Form_Element_Text("agenda_data");
     $agenda_data->setLabel("Selecione a data: ");
     $agenda_data->setAttribs(array('class' => 'form-control', 'autocomplete' => 'off'));
     $agenda_data->setRequired();
     $agenda_data->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // agenda_hora
     $agenda_hora = new Zend_Form_Element_Select("agenda_hora");
     $agenda_hora->setLabel('Selecione a hora: ');
     $agenda_hora->setAttribs(array('class' => 'form-control'));
     $agenda_hora->setMultiOptions(array('' => 'Horários'));
     $agenda_hora->setRequired();
     $agenda_hora->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $agenda_hora->setRegisterInArrayValidator(false);
     // agenda_observacao
     $agenda_observacao = new Zend_Form_Element_Textarea("agenda_observacao");
     $agenda_observacao->setLabel("Observações: ");
     $agenda_observacao->setAttribs(array('class' => 'form-control', 'rows' => 7, 'placeholder' => 'Informe alguma observação, por exemplo, alguma preferência de produto, etc.'));
     // salao_id
     $salao_id = new Zend_Form_Element_Hidden('salao_id');
     // especialidade_id
     $especialidade_id = new Zend_Form_Element_Hidden("especialidade_id");
     // usuario_id
     $usuario_id = new Zend_Form_Element_Hidden("usuario_id");
     $this->addElements(array($profissional_beleza_id, $agenda_data, $agenda_hora, $agenda_observacao, $salao_id, $especialidade_id, $usuario_id));
     parent::init();
 }
Exemplo n.º 17
0
 public function __construct($options = null)
 {
     // Construct the select menu data
     $rulers = new Rulers();
     $ruler_options = $rulers->getRulersByzantine();
     $denominations = new Denominations();
     $denomination_options = $denominations->getDenomsByzantine();
     $mints = new Mints();
     $mint_options = $mints->getMintsByzantine();
     $statuses = new Statuses();
     $status_options = $statuses->getCoinStatus();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new Weartypes();
     $wear_options = $wears->getWears();
     parent::__construct($options);
     $this->setName('romancoin');
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->addValidators(array('NotEmpty', 'Int'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => $denomination_options))->setRegisterInArrayValidator(false)->addValidator()->setDecorators($decorators);
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $ruler = new Zend_Form_Element_Select('ruler');
     $ruler->setLabel('Ruler: ')->addValidators(array('NotEmpty', 'Int'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => $ruler_options))->setRegisterInArrayValidator(false)->setDecorators($decorators);
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Integer'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $mint_ID = new Zend_Form_Element_Select('mint_id');
     $mint_ID->setLabel('Issuing mint: ')->addValidators(array('NotEmpty', 'Integer'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => $mint_options))->setRegisterInArrayValidator(false)->setDecorators($decorators);
     $mint_qualifier = new Zend_Form_Element_Radio('mint_qualifier');
     $mint_qualifier->setLabel('Mint qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Integer'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel('Status: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Integer'))->setValue(1)->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $status_options))->setDecorators($decorators);
     $status_qualifier = new Zend_Form_Element_Radio('status_qualifier');
     $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Integer'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Integer'))->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $wear_options))->setDecorators($decorators);
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->setDecorators($decorators);
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->addValidators(array('NotEmpty'))->setAttrib('rows', 8)->setAttrib('cols', 80)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'expanding');
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->addValidators(array('NotEmpty'))->setAttrib('rows', 8)->setAttrib('cols', 80)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'expanding');
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Int'))->addMultiOptions(array(NULL => NULL, 'Choose die axis' => $die_options))->setDecorators($decorators);
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidators(array('NotEmpty', 'Int'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60);
     $this->addElement($hash);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $this->addElements(array($ruler, $denomination, $mint_ID, $status, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $mint_qualifier, $ruler_qualifier, $denomination_qualifier, $status_qualifier, $submit));
     $this->addDisplayGroup(array('denomination', 'denomination_qualifier', 'ruler', 'ruler_qualifier', 'mint_id', 'mint_qualifier', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
Exemplo n.º 18
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $cats = new CategoriesCoins();
     $cat_options = $cats->getPeriodPostMed();
     $denominations = new Denominations();
     $denomination_options = $denominations->getOptionsPostMedieval();
     $statuses = new Statuses();
     $status_options = $statuses->getCoinStatus();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new WearTypes();
     $wear_options = $wears->getWears();
     $rulers = new Rulers();
     $ro = $rulers->getPostMedievalRulers();
     $mints = new Mints();
     $mo = $mints->getPostMedievalMints();
     parent::__construct($options);
     $this->setName('postmedievalcoin');
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose denomination', 'Available denominations' => $denomination_options))->addValidator('InArray', false, array(array_keys($denomination_options)))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Digits');
     $categoryID = new Zend_Form_Element_Select('categoryID');
     $categoryID->setLabel('Category of coin: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose category', 'Available categories' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $ruler_id = new Zend_Form_Element_Select('ruler_id');
     $ruler_id->setLabel('Ruler: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose ruler', 'Available rulers' => $ro))->addValidator('InArray', false, array(array_keys($ro)))->addValidator('Digits')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addValidator('Digits')->addFilters(array('StripTags', 'StringTrim'));
     $mint_id = new Zend_Form_Element_Select('mint_id');
     $mint_id->setLabel('Issuing mint: ')->addMultiOptions(array(null => 'Choose mint', 'Available mints' => $mo))->addValidator('InArray', false, array(array_keys($mo)))->addValidator('Digits')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel('Status: ')->setValue(1)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose coin status', 'Available status options' => $status_options))->addValidator('InArray', false, array(array_keys($status_options)));
     $status_qualifier = new Zend_Form_Element_Radio('status_qualifier');
     $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''));
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose coin wear', 'Available wear options' => $wear_options))->addValidator('InArray', false, array(array_keys($wear_options)))->setAttrib('class', 'input-xlarge selectpicker show-menu-arrow');
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->addFilters(array('StripTags', 'StringTrim', 'EmptyParagraph'))->setAttrib('class', 'span6');
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->addFilters(array('StripTags', 'StringTrim', 'EmptyParagraph'))->setAttribs(array('class' => 'span6'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->addValidators(array('NotEmpty'))->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph'));
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose die axis', 'Available dies' => $die_options))->addValidator('InArray', false, array(array_keys($die_options)))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''));
     $typeID = new Zend_Form_Element_Select('typeID');
     $typeID->setLabel('Coin type: ')->setRegisterInArrayValidator(false)->setRequired(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'));
     $rev_mm = new Zend_Form_Element_Textarea('reverse_mintmark');
     $rev_mm->setLabel('Reverse mint mark: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim', 'BasicHtml', 'EmptyParagraph'));
     $initial = new Zend_Form_Element_Textarea('initial_mark');
     $initial->setLabel('Initial mark: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim'));
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($ruler_id, $ruler_qualifier, $denomination, $denomination_qualifier, $mint_id, $typeID, $status, $categoryID, $status_qualifier, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $submit, $rev_mm, $initial));
     $this->addDisplayGroup(array('categoryID', 'ruler_id', 'typeID', 'ruler_qualifier', 'denomination', 'denomination_qualifier', 'mint_id', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'reverse_mintmark', 'initial_mark', 'die_axis_measurement', 'die_axis_certainty', 'submit'), 'details');
     parent::init();
 }
Exemplo n.º 19
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $rulers = new Rulers();
     $ro = $rulers->getJettonRulers();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new WearTypes();
     $wear_options = $wears->getWears();
     $categories = new JettonClasses();
     $cat_options = $categories->getClasses();
     $groups = new JettonGroups();
     $group_options = $groups->getGroups();
     $types = new JettonTypes();
     $type_options = $types->getTypes();
     parent::__construct($options);
     $this->setName('jettontoken');
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose denomination', 'Choose denomination' => array(64 => 'Jetton', 65 => 'Farthing token', 66 => 'Token halfpenny', 67 => 'Token penny')))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRegisterInArrayValidator(true)->addErrorMessage('You must enter a denomination');
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array(1 => 'Certain', 2 => 'Probably', 3 => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Int');
     $ruler = new Zend_Form_Element_Select('ruler_id');
     $ruler->setLabel('Ruler: ')->setRegisterInArrayValidator(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose an issuer', 'Available issuers' => $ro))->addValidator('InArray', false, array(array_keys($ro)));
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Ruler qualifier: ')->addMultiOptions(array(1 => 'Certain', 2 => 'Probably', 3 => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''));
     $mint_id = new Zend_Form_Element_Select('mint_id');
     $mint_id->setLabel('Issuing mint: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRegisterInArrayValidator(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose a mint', 'Available mints' => array(286 => 'Nuremberg', 1530 => 'Paris', 291 => 'Tournai', 1531 => 'Unknown')));
     $mint_qualifier = new Zend_Form_Element_Radio('mint_qualifier');
     $mint_qualifier->setLabel('Mint qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''));
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose degree of wear', 'Available options' => $wear_options))->addValidator('InArray', false, array(array_keys($wear_options)));
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'));
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'span6'));
     $reverse_mintmark = new Zend_Form_Element_Textarea('reverse_mintmark');
     $reverse_mintmark->setLabel('Reverse mint mark: ')->addValidators(array('NotEmpty'))->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'span6'))->addFilters(array('StripTags', 'StringTrim'));
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose die axis', 'Available dies' => $die_options))->addFilters(array('StripTags', 'StringTrim'))->addValidator('InArray', false, array(array_keys($die_options)));
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array(1 => 'Certain', 2 => 'Probably', 3 => 'Possibly'))->addFilter('StripTags')->addFilter('StringTrim')->setOptions(array('separator' => ''));
     $categoryID = new Zend_Form_Element_Select('jettonClass');
     $categoryID->setLabel('Class of token: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidators(array('NotEmpty', 'Digits'))->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose class', 'Available classes' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)));
     $jettonGroupID = new Zend_Form_Element_Select('jettonGroup');
     $jettonGroupID->setLabel('Group of token: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidators(array('NotEmpty', 'Digits'))->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose group', 'Available groups' => $group_options))->addValidator('InArray', false, array(array_keys($group_options)));
     $jettonTypeID = new Zend_Form_Element_Select('jettonType');
     $jettonTypeID->setLabel('Type of token: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidators(array('NotEmpty', 'Digits'))->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose type', 'Available types' => $type_options))->addValidator('InArray', false, array(array_keys($type_options)));
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($ruler, $denomination, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $mint_id, $mint_qualifier, $ruler_qualifier, $denomination_qualifier, $categoryID, $jettonGroupID, $jettonTypeID, $submit));
     $this->addDisplayGroup(array('jettonClass', 'jettonGroup', 'jettonType', 'denomination', 'denomination_qualifier', 'ruler_id', 'ruler_qualifier', 'mint_id', 'mint_qualifier', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
Exemplo n.º 20
0
 protected function buildCat2Element()
 {
     $cat2 = new Zend_Form_Element_Radio('cat2');
     $cat2->setLabel($this->_business->getCat2Name());
     $cat2->addMultiOptions($this->_business->getCat2Array(null, false));
     $cat2->setValue($this->_business->getFirstCat2(null, false));
     $cat2->setAttrib('class', 'refineformselect');
     $cat2->setAttrib('onclick', "changeCat2(this.id,this.value, '/ajax/realestate/changecat2/')");
     $this->addElement($cat2);
 }
Exemplo n.º 21
0
 public function __construct($options = null)
 {
     parent::__construct($options);
     $roles = new Roles();
     $role_options = $roles->getRoles();
     $inst = new Institutions();
     $inst_options = $inst->getInsts();
     $projecttypes = new ProjectTypes();
     $projectype_list = $projecttypes->getTypes();
     $this->setName('acceptupgrades');
     ZendX_JQuery::enableForm($this);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $level = new Zend_Form_Element_Select('level');
     $level->setLabel('Level of research: ')->setRequired(true)->addMultiOptions(array(NULL => NULL, 'Choose type of research' => $projectype_list))->setDecorators($decorators)->addFilter('StripTags')->addFilter('StringTrim')->addErrorMessage('You must set the level of research');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Project title: ')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('size', 60)->addErrorMessage('This project needs a title.')->setDecorators($decorators);
     $researchOutline = new Pas_Form_Element_RTE('researchOutline');
     $researchOutline->setLabel('Research outline: ')->setRequired(true)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilter('StringTrim')->addFilter('BasicHtml')->addFilter('EmptyParagraph')->addFilter('WordChars')->addErrorMessage('Outline must be present.');
     $reference = new Zend_Form_Element_Text('reference');
     $reference->setLabel('Referee\'s name: ')->setAttrib('size', 30)->addFilter('StringTrim')->addFilter('StripTags')->setDecorators($decorators);
     $referenceEmail = new Zend_Form_Element_Text('referenceEmail');
     $referenceEmail->setLabel('Referee\'s email address: ')->setAttrib('size', 30)->addValidator('EmailAddress')->addFilter('StringToLower')->addFilter('StringTrim')->addFilter('StripTags')->setDecorators($decorators);
     $message = new Pas_Form_Element_RTE('message');
     $message->setLabel('Message to user: '******'rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilter('StringTrim')->addFilter('BasicHtml')->addFilter('EmptyParagraph')->addFilter('WordChars')->addErrorMessage('You must enter a message for the user to know they have been approved.');
     $fullname = new Zend_Form_Element_Text('fullname');
     $fullname->setLabel('Fullname: ')->setAttrib('size', 30)->addFilter('StringTrim')->addFilter('StripTags')->setDecorators($decorators);
     $institution = $this->addElement('select', 'institution', array('label' => 'Recording institution: '))->institution;
     $institution->setDecorators($decorators)->addMultiOptions(array(NULL => NULL, 'Choose institution' => $inst_options));
     $role = $this->addElement('select', 'role', array('label' => 'Site role: '))->role;
     $role->setDecorators($decorators);
     $role->addMultiOptions(array(NULL => NULL, 'Choose role' => $role_options));
     $role->removeMultiOption('admin');
     $startDate = new ZendX_JQuery_Form_Element_DatePicker('startDate');
     $startDate->setLabel('Start date of project: ')->setAttrib('size', 12)->setJQueryParam('dateFormat', 'yy-mm-dd')->addFilter('StringTrim')->addFilter('StripTags')->addValidator('Date')->setRequired(false)->addErrorMessage('You must enter a valid start date for this project');
     $endDate = new ZendX_JQuery_Form_Element_DatePicker('endDate');
     $endDate->setLabel('End date of project: ')->addValidator('Date')->addFilter('StringTrim')->addFilter('StripTags')->setJQueryParam('dateFormat', 'yy-mm-dd')->setAttrib('size', 12)->setRequired(false)->addErrorMessage('You must enter a valid end date for this project');
     $email = $this->addElement('text', 'email', array('label' => 'Email Address', 'size' => '30'))->email;
     $email->addValidator('emailAddress')->setRequired(true)->addFilter('StringToLower')->addErrorMessage('Please enter a valid address!')->setDecorators($decorators);
     $already = new Zend_Form_Element_Radio('already');
     $already->setLabel('Is your topic already listed on our research register?: ')->addMultiOptions(array(1 => 'Yes it is', 0 => 'No it isn\'t'))->setRequired(true)->setOptions(array('separator' => ''))->setDecorators($decorators);
     $insert = new Zend_Form_Element_Checkbox('insert');
     $insert->setLabel('Insert details into research register: ')->setCheckedValue(1)->setDecorators($decorators);
     $valid = new Zend_Form_Element_Radio('higherLevel');
     $valid->setLabel('Approve?: ')->addMultiOptions(array(1 => 'Unauthorised', 0 => 'Authorised'))->setRequired(true)->setOptions(array('separator' => ''))->setDecorators($decorators);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submit')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $this->addElements(array($reference, $referenceEmail, $researchOutline, $startDate, $endDate, $fullname, $valid, $level, $title, $submit, $already, $insert, $message));
     $this->addDisplayGroup(array('fullname', 'username', 'email', 'institution', 'level', 'role', 'reference', 'referenceEmail', 'message', 'researchOutline', 'title', 'startDate', 'endDate', 'already', 'higherLevel', 'insert'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->details->setLegend('Details: ');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
Exemplo n.º 22
0
 public function init()
 {
     $this->setName('Buscar');
     $materia = new Zend_Form_Element_Text('materia');
     $materia->setLabel('Materia')->setRequired(true)->addFilter('StringTrim')->addValidator('NotEmpty');
     $cursadas = new Zend_Form_Element_Radio('cursadas');
     $cursadas->setLabel('personas que han cursado materia')->addMultiOptions(array('si' => 'Si', 'no' => 'No'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('materia', 'submitbutton');
     $this->addElements(array($materia, $cursadas, $submit));
 }
Exemplo n.º 23
0
 protected function buildCat1Element()
 {
     $cat1 = new Zend_Form_Element_Radio('cat1');
     $cat1->setLabel($this->_business->getCat1Name());
     $cat1->setMultiOptions($this->_business->getCat1Array());
     //$cat1->setValue($this->_business->getFirstCat1());
     logfire('FFFkey', $this->_business->getFirstCat1());
     $cat1->setValue($this->_business->getFirstCat1());
     $cat1->setAttrib('class', 'refineformselect');
     $this->addElement($cat1);
 }
Exemplo n.º 24
0
 public function init()
 {
     /* Form Elements & Other Definitions Here ... */
     $this->setName('profissional');
     $this->setAction("new-profissional");
     $nome = new Zend_Form_Element_Text('nome');
     $nome->setLabel("Nome")->setRequired(true)->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'))->addFilter('StripTags')->addValidator("StringLength", false, array(4, 80, 'messages' => 'StringLength'))->addValidator('NotEmpty');
     $sobreNome = new Zend_Form_Element_Text('sobrenome');
     $sobreNome->setLabel("Sobrenome:")->setRequired(true)->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campoFim'))->addFilter('StripTags')->addValidator("StringLength", false, array(4, 50, 'messages' => 'StringLength'))->addValidator('NotEmpty');
     $login = new Zend_Form_Element_Text('login');
     $login->setLabel('usuario:')->setRequired(true)->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'))->addValidator("StringLength", false, array(4, 50, 'messages' => 'StringLength'))->addValidator('NotEmpty');
     $passworf = new Zend_Form_Element_Password("senha");
     $passworf->setLabel('senha:')->setRequired(true)->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'))->addValidator("StringLength", false, array(4, 50, 'messages' => 'StringLength'))->addValidator('NotEmpty');
     $confirmPassworf = new Zend_Form_Element_Password("confirm_senha");
     $confirmPassworf->setLabel('confirma senha:')->setRequired(true)->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'))->addValidator("StringLength", false, array(4, 50, 'messages' => 'StringLength'))->addValidator('NotEmpty');
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('email:')->setRequired(true)->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campoFim'))->addValidator("StringLength", false, array(4, 50, 'messages' => 'StringLength'))->addValidator('NotEmpty')->addValidator('regex', false, array('/[^a-zA-Z0-9@#\\[\\].]/'));
     //-----
     $radio = new Zend_Form_Element_Radio('sexo');
     $radio->setLabel('Sexo')->setMultiOptions(array('1' => 'Mascolino', '2' => 'Feminino'))->setOptions(array('separator' => '&nbsp;&nbsp;&nbsp;'))->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'btRadio'));
     $dataNacimento = new Zend_Form_Element_Text("dataNacimento");
     $dataNacimento->setLabel('Data nascimento:')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'));
     /*	$cpf = new Zend_Form_Element_Text('cpf');
     		$cpf->setLabel('CPF:')
     			->setRequired(true)
     			->setAttrib('alt', 'cpf')
     			->addFilter('StripTags')
     			->addValidator('Cpf')
     			->addFilter('StringTrim')
     			->addValidator('NotEmpty')
     			->addDecorator('HtmlTag',
     						array('tag'=>'div', 'class'=>'campoFim'));
        		*/
     $db_estado = new Application_Model_DbTable_SysEstado();
     $state_array = $db_estado->fetchAll()->toArray();
     $arr[0] = "Escolha estado";
     foreach ($state_array as $est) {
         $arr[] = $est["nome"];
     }
     unset($arr[29]);
     unset($arr[28]);
     $state = new Zend_Form_Element_Select("estado");
     $state->setLabel('Estado:')->setName("estado")->addMultiOptions($arr)->setRequired(true)->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'));
     $cities = new Zend_Form_Element_Select("cidade");
     $cities->setLabel('Cidade:')->setName("cidade")->setOptions(array('RegisterInArrayValidator' => false))->setRequired(true)->addMultiOptions(array('0' => 'Escolha estado'))->addFilter('StripTags')->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'campo'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Cadastrar')->setAttrib('id', 'submitbutton');
     //decoracao
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form')), array('Description', array('placement' => 'prepend')), 'Form'));
     $this->addElements(array($nome, $sobreNome, $login, $passworf, $confirmPassworf, $email, $radio, $state, $cities, $submit));
     $translate = Zend_Registry::get('Zend_Translate');
     $this->setTranslator($translate);
     $translate->setLocale('br');
 }
Exemplo n.º 25
0
 public function init()
 {
     $this->setMethod('post');
     $fadm_id_fase = new Zend_Form_Element_Hidden('fa_id');
     $fadm_id_fase->addFilter('Int')->removeDecorator('Label')->removeDecorator('HtmlTag');
     $fadm_ds_fase = new Zend_Form_Element_Text('fa_descricao');
     $fadm_ds_fase->setLabel('Descrição:')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator('Alnum', false, true)->addValidator('StringLength', false, array(5, 100));
     $fadm_ic_dcto_ativa = new Zend_Form_Element_Radio('fa_situacao');
     $fadm_ic_dcto_ativa->setLabel('Fase documento?')->setRequired(true)->setMultiOptions(array('1' => 'Sim', '0' => 'Não'));
     $submit = new Zend_Form_Element_Submit('Salvar');
     $this->addElements(array($fadm_id_fase, $fadm_ds_fase, $fadm_ic_dcto_ativa, $submit));
 }
Exemplo n.º 26
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     // Construct the select menu data
     $rulers = new Rulers();
     $ruler_options = $rulers->getRulersGreek();
     $denominations = new Denominations();
     $denomination_options = $denominations->getDenomsGreek();
     $mints = new Mints();
     $mint_options = $mints->getMintsGreek();
     $statuses = new Statuses();
     $status_options = $statuses->getCoinStatus();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new WearTypes();
     $wear_options = $wears->getWears();
     parent::__construct($options);
     $this->setName('greekcoin');
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->addMultiOptions(array(null => 'Choose a denomination', 'Valid denominations' => $denomination_options))->addFilters(array('StringTrim', 'StripTags'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('InArray', false, array(array_keys($denomination_options)));
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''));
     $ruler = new Zend_Form_Element_Select('ruler_id');
     $ruler->setLabel('Ruler: ')->addValidators(array('NotEmpty', 'Int'))->addFilters(array('StringTrim', 'StripTags'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a ruler', 'Valid coin issuers' => $ruler_options))->addValidator('InArray', false, array(array_keys($ruler_options)));
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''));
     $mint_ID = new Zend_Form_Element_Select('mint_id');
     $mint_ID->setLabel('Issuing mint: ')->addValidators(array('NotEmpty', 'Int'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(null => 'Choose denomination', 'Available options' => $mint_options))->addValidator('InArray', false, array(array_keys($mint_options)));
     $mint_qualifier = new Zend_Form_Element_Radio('mint_qualifier');
     $mint_qualifier->setLabel('Mint qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''));
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel('Status: ')->setValue(1)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(null => 'Choose coin status', 'Available options' => $status_options))->addValidator('InArray', false, array(array_keys($status_options)));
     $status_qualifier = new Zend_Form_Element_Radio('status_qualifier');
     $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''));
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose degree of wear', 'Available options' => $wear_options))->addValidator('InArray', false, array(array_keys($wear_options)))->addFilters(array('StringTrim', 'StripTags'));
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setAttrib('class', 'span6')->addFilters(array('StringTrim', 'StripTags', 'BasicHtml', 'EmptyParagraph'));
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->setAttrib('class', 'span6')->addFilters(array('StringTrim', 'StripTags', 'BasicHtml', 'EmptyParagraph'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->addValidators(array('NotEmpty'))->setAttrib('rows', 8)->setAttrib('cols', 60)->setAttrib('class', 'span6')->addFilters(array('StringTrim', 'StripTags', 'BasicHtml', 'EmptyParagraph'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->addValidators(array('NotEmpty'))->setAttrib('rows', 8)->setAttrib('cols', 60)->setAttrib('class', 'span6')->addFilters(array('StringTrim', 'StripTags', 'BasicHtml', 'EmptyParagraph'));
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose die axis', 'Available options' => $die_options))->addValidator('InArray', false, array(array_keys($die_options)))->addFilters(array('StringTrim', 'StripTags'));
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''));
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($ruler, $denomination, $mint_ID, $status, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $mint_qualifier, $ruler_qualifier, $denomination_qualifier, $status_qualifier, $submit));
     $this->addDisplayGroup(array('denomination', 'denomination_qualifier', 'ruler_id', 'ruler_qualifier', 'mint_id', 'mint_qualifier', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
Exemplo n.º 27
0
 public function __construct($options = null)
 {
     $rulers = new Rulers();
     $ro = $rulers->getJettonRulers();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new Weartypes();
     $wear_options = $wears->getWears();
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('jettontoken');
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => array('64' => 'Jetton')))->setRegisterInArrayValidator(true)->setDecorators($decorators)->addErrorMessage('You must enter a denomination');
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators)->addValidator('Int');
     $ruler = new Zend_Form_Element_Select('ruler_id');
     $ruler->setLabel('Ruler: ')->setRegisterInArrayValidator(false)->setDecorators($decorators)->addMultiOptions(array(NULL => "Choose an issuer", 'Available rulers' => $ro))->addValidator('InArray', false, array(array_keys($ro)));
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Ruler qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $mint_id = new Zend_Form_Element_Select('mint_id');
     $mint_id->setLabel('Issuing mint: ')->setRegisterInArrayValidator(true)->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose a mint' => array('286' => 'Nuremberg')));
     $mint_qualifier = new Zend_Form_Element_Radio('mint_qualifier');
     $mint_qualifier->setLabel('Mint qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $wear_options))->addValidator('InArray', false, array(array_keys($wear_options)))->setDecorators($decorators);
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->setAttrib('size', 50)->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'expanding'))->addFilters(array('StripTags', 'StringTrim'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'expanding'));
     $reverse_mintmark = new Zend_Form_Element_Textarea('reverse_mintmark');
     $reverse_mintmark->setLabel('Reverse mintmark: ')->addValidators(array('NotEmpty'))->setAttribs(array('rows' => 3, 'cols' => 80, 'class' => 'expanding'))->addFilters(array('StripTags', 'StringTrim'));
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->addMultiOptions(array(NULL => NULL, 'Choose die axis' => $die_options))->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('InArray', false, array(array_keys($die_options)));
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilter('StripTags')->addFilter('StringTrim')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $this->addElements(array($ruler, $denomination, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $mint_id, $mint_qualifier, $ruler_qualifier, $denomination_qualifier, $hash, $submit));
     $this->addDisplayGroup(array('denomination', 'denomination_qualifier', 'ruler_id', 'ruler_qualifier', 'mint_id', 'mint_qualifier', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
Exemplo n.º 28
0
 public function init()
 {
     // Set the method for the display form to POST
     $this->setMethod('post');
     // Add an id element
     if (is_object($this->_defaultValues)) {
         $this->addElement('hidden', 'id', array('value' => $this->_defaultValues->id));
         $this->addElement('hidden', 'shortId', array('value' => $this->_defaultValues->shortId));
     }
     // Add an name element
     $this->addElement('text', 'name', array('label' => 'Your name:', 'filters' => array('StringTrim'), 'value' => is_object($this->_defaultValues) ? $this->_defaultValues->name : ''));
     // Get list of languages
     if ($handle = opendir(realpath(APPLICATION_PATH . '/../library/geshi'))) {
         while (false !== ($file = readdir($handle))) {
             if ($file != "." && $file != "..") {
                 $lang = str_ireplace('.php', '', $file);
                 $languages[$lang] = $lang;
             }
         }
         closedir($handle);
     }
     // Add the language element
     $languageSelect = new Zend_Form_Element_Select('language');
     $languageSelect->setLabel('Language:')->setRequired(true)->addMultiOptions($languages)->setValue(is_object($this->_defaultValues) ? $this->_defaultValues->language : 'php');
     $this->addElement($languageSelect);
     // Add the code element
     $this->addElement('textarea', 'code', array('label' => 'Code:', 'required' => true, 'class' => 'codeInput', 'value' => is_object($this->_defaultValues) ? $this->_defaultValues->code : ''));
     $expireOptions = array('hour', 'day', 'month', 'never');
     $expireArr = array();
     foreach ($expireOptions as $value) {
         $expireArr[$value] = ucfirst($value);
     }
     // Add the expires element
     $expiresSelect = new Zend_Form_Element_Radio('expires');
     $expiresSelect->setLabel('Expires After:')->setRequired(true)->addMultiOptions($expireArr)->setValue('month');
     $this->addElement($expiresSelect);
     // grab the config object
     $config = Zend_Registry::get('config');
     if ($config->site->captcha) {
         // Add a captcha
         $this->addElement('captcha', 'captcha', array('label' => 'Please enter the 5 letters displayed below:', 'required' => true, 'captcha' => array('captcha' => 'Figlet', 'wordLen' => 5, 'timeout' => 300)));
     }
     // Add the submit button
     $this->addElement('submit', 'submit', array('ignore' => true, 'label' => 'Save'));
     if ($config->site->captcha) {
         // And finally add some CSRF protection
         $this->addElement('hash', 'csrf', array('ignore' => true));
     }
 }
Exemplo n.º 29
0
 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'feedforwardinit');
     $id = new Zend_Form_Element_Hidden('id');
     $postid = Zend_Controller_Front::getInstance()->getRequest()->getParam('id');
     $appraisal_mode = new Zend_Form_Element_Select('appraisal_mode');
     $appraisal_mode->setLabel("Appraisal");
     $appraisal_mode->setMultiOptions(array('' => 'Select Appraisal'));
     $appraisal_mode->setAttrib('class', 'selectoption');
     $appraisal_mode->setRequired(true);
     $appraisal_mode->addValidator('NotEmpty', false, array('messages' => 'Please select appraisal.'));
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel("Status");
     $status->setAttrib('class', 'selectoption');
     $status->setMultiOptions(array('1' => 'Open'));
     //,'2' => 'Close'
     $status->setRegisterInArrayValidator(false);
     $status->setRequired(true);
     $status->addValidator('NotEmpty', false, array('messages' => 'Please select status.'));
     $employee_name_view = new Zend_Form_Element_Radio('employee_name_view');
     $employee_name_view->setLabel("Employee Details");
     $employee_name_view->addMultiOptions(array('1' => 'Show', '0' => 'Hide'));
     $employee_name_view->setSeparator('');
     $employee_name_view->setValue(0);
     $employee_name_view->setRegisterInArrayValidator(false);
     $enable_to = new Zend_Form_Element_MultiCheckbox('enable_to');
     $enable_to->setLabel("Enable To");
     $enable_to->addMultiOptions(array('0' => 'Appraisal Employees', '1' => 'All Employees'));
     $enable_to->setSeparator('');
     $enable_to->setValue(0);
     $enable_to->setRequired(true);
     $enable_to->setRegisterInArrayValidator(false);
     $enable_to->addValidator('NotEmpty', false, array('messages' => 'Please check enable to.'));
     $ff_due_date = new Zend_Form_Element_Text('ff_due_date');
     $ff_due_date->setLabel("Due Date");
     $ff_due_date->setOptions(array('class' => 'brdr_none'));
     $ff_due_date->setRequired(true);
     $ff_due_date->addValidator('NotEmpty', false, array('messages' => 'Please select due date.'));
     $save = new Zend_Form_Element_Submit('submit');
     $save->setAttrib('id', 'submitbutton');
     $save->setLabel('Save & Initialize');
     $save_later = new Zend_Form_Element_Submit('submit');
     $save_later->setAttrib('id', 'submitbutton1');
     $save_later->setLabel('Save & Initialize Later');
     $this->addElements(array($id, $appraisal_mode, $status, $employee_name_view, $ff_due_date, $save, $save_later, $enable_to));
     $this->setElementDecorators(array('ViewHelper'));
 }
Exemplo n.º 30
0
 public function init()
 {
     // cliente_tipo
     $cliente_tipo = new Zend_Form_Element_Radio("cliente_tipo");
     $cliente_tipo->setLabel("Tipo: ");
     $cliente_tipo->setRequired();
     $cliente_tipo->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente_tipo->setMultiOptions(array('PF' => ' Pessoa Física', 'PJ' => ' Pessoa Jurídica'));
     // cliente_empresa
     $cliente_empresa = new Zend_Form_Element_Text("cliente_empresa");
     $cliente_empresa->setLabel("Empresa:");
     $cliente_empresa->setAttribs(array('class' => 'form-control'));
     // cliente_nome
     $cliente_nome = new Zend_Form_Element_Text("cliente_nome");
     $cliente_nome->setLabel("Contato:");
     $cliente_nome->setRequired();
     $cliente_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $cliente_nome->setAttribs(array('class' => 'form-control'));
     // cliente_email
     $cliente_email = new Zend_Form_Element_Text("cliente_email");
     $cliente_email->setLabel("E-mail:");
     $cliente_email->setRequired();
     $cliente_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $cliente_email->setAttribs(array('class' => 'form-control'));
     // cliente_telefone
     $cliente_telefone = new Zend_Form_Element_Text("cliente_telefone");
     $cliente_telefone->setLabel("Telefone:");
     $cliente_telefone->setAttribs(array('class' => 'form-control'));
     // cliente_celular
     $cliente_celular = new Zend_Form_Element_Text("cliente_celular");
     $cliente_celular->setLabel("Celular:");
     $cliente_celular->setAttribs(array('class' => 'form-control'));
     // cliente_cidade
     $cliente_cidade = new Zend_Form_Element_Text("cliente_cidade");
     $cliente_cidade->setLabel("Cidade:");
     $cliente_cidade->setAttribs(array('class' => 'form-control'));
     // cliente_estado
     $cliente_estado = new Zend_Form_Element_Select("cliente_estado");
     $cliente_estado->setLabel("Estado:");
     $cliente_estado->setAttribs(array('class' => 'form-control'));
     $cliente_estado->setMultiOptions($this->getEstados());
     /**
      * Add elements
      */
     $this->addElements(array($cliente_tipo, $cliente_empresa, $cliente_nome, $cliente_email, $cliente_telefone, $cliente_celular, $cliente_cidade, $cliente_estado));
     parent::init();
 }