当前位置: 首页>>代码示例>>PHP>>正文


PHP ZendX_JQuery_Form_Element_DatePicker::setLabel方法代码示例

本文整理汇总了PHP中ZendX_JQuery_Form_Element_DatePicker::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP ZendX_JQuery_Form_Element_DatePicker::setLabel方法的具体用法?PHP ZendX_JQuery_Form_Element_DatePicker::setLabel怎么用?PHP ZendX_JQuery_Form_Element_DatePicker::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZendX_JQuery_Form_Element_DatePicker的用法示例。


在下文中一共展示了ZendX_JQuery_Form_Element_DatePicker::setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $projecttypes = new ProjectTypes();
     $projectype_list = $projecttypes->getTypes();
     ZendX_JQuery::enableForm($this);
     parent::__construct($options);
     $this->setName('research');
     $investigator = new Zend_Form_Element_Text('investigator');
     $investigator->setLabel('Principal work conducted by: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a lead for this project.');
     $level = new Zend_Form_Element_Select('level');
     $level->setLabel('Level of research: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => null, 'Choose type of research' => $projectype_list))->addValidator('inArray', false, array(array_keys($projectype_list)));
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Project title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'Purifier'))->setAttrib('size', 60)->addErrorMessage('Choose title for the project.');
     $description = new Pas_Form_Element_CKEditor('description');
     $description->setLabel('Short description of project: ')->setRequired(false)->setAttribs(array('cols' => 80, 'rows' => 10))->addFilters(array('BasicHtml', 'StringTrim', 'EmptyParagraph'));
     $startDate = new ZendX_JQuery_Form_Element_DatePicker('startDate');
     $startDate->setLabel('Start date of project')->setAttrib('size', 20)->setJQueryParam('dateFormat', 'yy-mm-dd')->setRequired(false)->addErrorMessage('You must enter a start date for this project');
     $endDate = new ZendX_JQuery_Form_Element_DatePicker('endDate');
     $endDate->setLabel('End date of project')->setAttrib('size', 20)->setJQueryParam('dateFormat', 'yy-mm-dd')->setRequired(false)->addErrorMessage('You must enter an end date for this project');
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->setLabel('Make public: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($title, $description, $level, $startDate, $endDate, $valid, $investigator, $submit));
     $this->addDisplayGroup(array('title', 'investigator', 'level', 'description', 'startDate', 'endDate', 'valid'), 'details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:32,代码来源:ResearchForm.php

示例2: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $staffregions = new StaffRegions();
     $staffregions_options = $staffregions->getOptions();
     ZendX_JQuery::enableForm($this);
     parent::__construct($options);
     $this->setName('vacancies');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Role title: ')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('You must enter a title for this vacancy.')->setAttrib('size', 60);
     $salary = new Zend_Form_Element_Text('salary');
     $salary->setLabel('Salary: ')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->setAttrib('size', 20)->addErrorMessage('You must enter a salary.');
     $specification = new Pas_Form_Element_CKEditor('specification');
     $specification->setLabel('Job specification: ')->setRequired(true)->addFilters(array('BasicHtml', 'StringTrim'))->setAttribs(array('cols' => 50, 'rows' => 10, 'Height' => 400))->addErrorMessage('You must enter a job description.');
     $regionID = new Zend_Form_Element_Select('regionID');
     $regionID->setLabel('Location of role: ')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addValidator('InArray', false, array(array_keys($staffregions_options)))->addMultiOptions(array(null => 'Choose region', 'Available regions' => $staffregions_options))->addErrorMessage('You must choose a region');
     $live = new ZendX_JQuery_Form_Element_DatePicker('live');
     $live->setLabel('Date for advert to go live: ')->setRequired(true)->setJQueryParam('dateFormat', 'yy-mm-dd')->setJQueryParam('maxDate', '+1y')->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('Come on it\'s not that hard, enter a title!')->setAttrib('size', 20);
     $expire = new ZendX_JQuery_Form_Element_DatePicker('expire');
     $expire->setLabel('Date for advert to expire: ')->setRequired(true)->setJQueryParam('dateFormat', 'yy-mm-dd')->setJQueryParam('maxDate', '+1y')->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('Come on it\'s not that hard, enter a title!')->setAttrib('size', 20);
     $status = new Zend_Form_Element_Select('status');
     $status->SetLabel('Publish status: ')->setRequired(true)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a status', 2 => 'Publish', 1 => 'Draft'))->setValue(2)->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('You must choose a status');
     $submit = new Zend_Form_Element_Submit('submit');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $this->addElements(array($title, $salary, $specification, $regionID, $live, $expire, $status, $submit, $hash));
     $this->addDisplayGroup(array('title', 'salary', 'specification', 'regionID'), 'details');
     $this->details->setLegend('Vacancy details');
     $this->addDisplayGroup(array('live', 'expire', 'status'), 'dates');
     $this->dates->setLegend('Publication details');
     $this->setLegend('Vacancy details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:38,代码来源:VacancyForm.php

示例3: __construct

 public function __construct($options = null)
 {
     $staff = new Contacts();
     $flos = $staff->getAttending();
     parent::__construct($options);
     ZendX_JQuery::enableForm($this);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('addFlo');
     $flo = new Zend_Form_Element_Select('staffID');
     $flo->setLabel('Finds officer present: ')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addValidator('Int')->setDecorators($decorators)->addMultiOptions(array(NULL => 'Choose attending officer', 'Our staff members' => $flos));
     $dateFrom = new ZendX_JQuery_Form_Element_DatePicker('dateFrom');
     $dateFrom->setLabel('Attended from: ')->setRequired(true)->addValidator('Date')->addFilters(array('StripTags', 'StringTrim'))->addValidator('NotEmpty')->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->removeDecorator('DtDdWrapper');
     $dateTo = new ZendX_JQuery_Form_Element_DatePicker('dateTo');
     $dateTo->setLabel('Attended to: ')->setRequired(true)->addValidator('Date')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->removeDecorator('DtDdWrapper');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submit')->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(60);
     $this->addElement($hash);
     $this->addElements(array($flo, $dateFrom, $dateTo, $submit));
     $this->addDisplayGroup(array('staffID', 'dateFrom', 'dateTo'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->details->setLegend('Attending Finds Officers');
     $this->addDisplayGroup(array('submit'), 'submit');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:29,代码来源:AddFloRallyForm.php

示例4: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $levels = new ProjectTypes();
     $levelsListed = $levels->getDegrees();
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'apppend', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('education');
     ZendX_JQuery::enableForm($this);
     $school = new Zend_Form_Element_Text('school');
     $school->setLabel('Institution name: ')->setRequired(true)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 30)->addErrorMessage('Please enter a valid institutional name!')->setDecorators($decorators);
     $schoolUrl = new Zend_Form_Element_Text('schoolUrl');
     $schoolUrl->setLabel('Institution web address: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->addValidator('Uri')->setAttrib('size', 30)->addErrorMessage('Please enter a valid url!')->setDecorators($decorators);
     $subject = new Zend_Form_Element_Text('subject');
     $subject->setLabel('Subject studied: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->setAttrib('size', 30)->addErrorMessage('Please enter a valid string!')->setDecorators($decorators);
     $level = new Zend_Form_Element_Select('level');
     $level->setLabel('Adademic level of study: ')->addMultiOptions(array(NULL => 'Choose an academic level', 'Valid levels' => $levelsListed))->setDecorators($decorators);
     $dateFrom = new ZendX_JQuery_Form_Element_DatePicker('dateFrom');
     $dateFrom->setLabel('Commenced programme: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('NotEmpty', 'Date')->addValidator('NotEmpty')->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->setJQueryParams(array('yearRange' => '-20:+10'));
     $dateTo = new ZendX_JQuery_Form_Element_DatePicker('dateTo');
     $dateTo->setLabel('Finished programme: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('NotEmpty', 'Date')->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->removeDecorator('DtDdWrapper')->setJQueryParams(array('yearRange' => '-20:+10'));
     $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', 'submit')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $this->addElements(array($school, $schoolUrl, $subject, $level, $dateFrom, $dateTo, $submit));
     $this->addDisplayGroup(array('school', 'schoolUrl', 'subject', 'level', 'dateFrom', 'dateTo'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->details->setLegend('Educational background');
     $this->addDisplayGroup(array('submit'), 'submit');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:35,代码来源:EducationForm.php

示例5: __construct

 public function __construct($options = null)
 {
     $projecttypes = new ProjectTypes();
     $projectype_list = $projecttypes->getTypes();
     ZendX_JQuery::enableForm($this);
     parent::__construct($options);
     $this->setName('research');
     $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')));
     $investigator = new Zend_Form_Element_Text('investigator');
     $investigator->setLabel('Principal work conducted by: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a lead for this project.')->setDecorators($decorators)->addValidator('Alnum', false, array('allowWhiteSpace' => true));
     $level = new Zend_Form_Element_Select('level');
     $level->setLabel('Level of research: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose type of research' => $projectype_list))->addValidator('inArray', false, array(array_keys($projectype_list)))->setDecorators($decorators);
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Project title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addErrorMessage('Choose title for the project.')->setDecorators($decorators)->addValidator('Alnum', false, array('allowWhiteSpace' => true));
     $description = $this->addElement('RTE', 'description', array('label' => 'Short description of project: '));
     $description = $this->getElement('description')->setRequired(false)->addFilter('stringTrim')->setAttribs(array('cols' => 80, 'rows' => 10))->addFilters(array('BasicHtml', 'StringTrim', 'EmptyParagraph'))->addDecorator('HtmlTag', array('tag' => 'li'));
     $startDate = new ZendX_JQuery_Form_Element_DatePicker('startDate');
     $startDate->setLabel('Start date of project')->setAttrib('size', 20)->setJQueryParam('dateFormat', 'yy-mm-dd')->addValidator('Date')->setRequired(false)->addErrorMessage('You must enter a start date for this project')->setDecorators($decorators);
     $endDate = new ZendX_JQuery_Form_Element_DatePicker('endDate');
     $endDate->setLabel('End date of project')->setAttrib('size', 20)->setJQueryParam('dateFormat', 'yy-mm-dd')->setRequired(false)->addValidator('Date')->addErrorMessage('You must enter an end date for this project')->setDecorators($decorators);
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->setLabel('Make public: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submit')->removeDecorator('label')->setAttrib('class', 'large')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElements(array($title, $description, $level, $startDate, $endDate, $valid, $investigator, $submit, $hash));
     $this->addDisplayGroup(array('title', 'investigator', 'level', 'description', 'startDate', 'endDate', 'valid'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:32,代码来源:ResearchForm.php

示例6: __construct

 public function __construct($options = null)
 {
     $curators = new Peoples();
     $assigned = $curators->getCurators();
     ZendX_JQuery::enableForm($this);
     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('actionsForTreasure');
     $curatorID = new Zend_Form_Element_Select('curatorID');
     $curatorID->setLabel('Curator assigned: ')->setRequired(true)->addValidator('InArray', false, array(array_keys($assigned)))->addMultiOptions($assigned)->setDecorators($decorators);
     $chaseDate = new ZendX_JQuery_Form_Element_DatePicker('chaseDate');
     $chaseDate->setLabel('Chase date assigned: ')->setRequired(true)->setJQueryParam('dateFormat', 'yy-mm-dd')->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('You must enter a chase date')->setAttrib('size', 20)->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->removeDecorator('DtDdWrapper');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $this->addElements(array($curatorID, $chaseDate, $submit, $hash));
     $this->addDisplayGroup(array('curatorID', 'chaseDate'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->addDisplayGroup(array('submit'), 'submit');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:25,代码来源:TreasureAssignForm.php

示例7: __construct

 public function __construct($options = null)
 {
     $curators = new Peoples();
     $assigned = $curators->getValuers();
     ZendX_JQuery::enableForm($this);
     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('provisionalvaluations');
     $valuerID = new Zend_Form_Element_Select('valuerID');
     $valuerID->setLabel('Valuation provided by: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 25))->addValidator('InArray', false, array(array_keys($assigned)))->addMultiOptions($assigned)->setDecorators($decorators);
     $value = new Zend_Form_Element_Text('value');
     $value->setLabel('Estimated market value: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Float')->setDecorators($decorators);
     $comments = new Pas_Form_Element_RTE('comments');
     $comments->setLabel('Valuation comments: ')->setRequired(false)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $dateOfValuation = new ZendX_JQuery_Form_Element_DatePicker('dateOfValuation');
     $dateOfValuation->setLabel('Valuation provided on: ')->setRequired(true)->setJQueryParam('dateFormat', 'yy-mm-dd')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 20)->addValidator('Date')->addDecorator(array('ListWrapper' => 'HtmlTag'), array('tag' => 'li'))->removeDecorator('DtDdWrapper');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $this->addElements(array($valuerID, $value, $dateOfValuation, $comments, $submit));
     $this->addDisplayGroup(array('valuerID', 'value', 'dateOfValuation', 'comments'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
     $this->addDisplayGroup(array('submit'), 'submit');
     $this->submit->removeDecorator('DtDdWrapper');
     $this->submit->removeDecorator('HtmlTag');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:27,代码来源:ProvisionalValuationForm.php

示例8: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'businessunitsreport');
     $this->setAttrib('action', BASE_URL . 'reports/businessunits');
     $bunitname = new Zend_Form_Element_Text('bunitname');
     $bunitname->setLabel('Business Unit');
     $bunitname->setAttrib('onblur', 'clearbuname(this)');
     $bunitcode = new Zend_Form_Element_Text('bunitcode');
     $bunitcode->setLabel('Code');
     $bunitcode->setAttrib('onblur', 'clearbuname(this)');
     $bunitcode->setAttrib('class', 'selectoption');
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setLabel('Started On');
     $startdate->setAttrib('readonly', 'true');
     $startdate->setOptions(array('class' => 'brdr_none'));
     $start_date = new ZendX_JQuery_Form_Element_DatePicker('start_date');
     $start_date->setAttrib('readonly', 'true');
     $start_date->setAttrib('onfocus', 'this.blur()');
     $start_date->setOptions(array('class' => 'brdr_none'));
     $country = new Zend_Form_Element_Select('country');
     $country->setLabel('Country');
     $this->addElements(array($bunitname, $bunitcode, $startdate, $country));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('startdate'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:27,代码来源:businessunitsreport.php

示例9: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'leavereport');
     $id = new Zend_Form_Element_Hidden('id');
     $employeename = new Zend_Form_Element_Text('employeename');
     $employeename->setLabel('Leave Applied By');
     $employeename->setAttrib('onblur', 'clearautocompletename(this)');
     $department = new Zend_Form_Element_Select('department');
     $department->setLabel('Department');
     $department->addMultiOption('', 'Select Department');
     $department->setAttrib('class', 'selectoption');
     $department->setRegisterInArrayValidator(false);
     $leavestatus = new Zend_Form_Element_Select('leavestatus');
     $leavestatus->setLabel('Leave Status');
     $leavestatus->setMultiOptions(array('' => 'Select Leave Status', '1' => 'Pending for approval', '2' => 'Approved', '3' => 'Rejected', '4' => 'Cancel'));
     $leavestatus->setRegisterInArrayValidator(false);
     $from_date = new ZendX_JQuery_Form_Element_DatePicker('from_date');
     $from_date->setLabel('Applied Date');
     $from_date->setAttrib('readonly', 'true');
     $from_date->setAttrib('onfocus', 'this.blur()');
     $from_date->setOptions(array('class' => 'brdr_none'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $employeename, $department, $leavestatus, $from_date, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('from_date'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:30,代码来源:leavereport.php

示例10: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'departmentsreport');
     $this->setAttrib('action', BASE_URL . 'reports/departments');
     $deptname = new Zend_Form_Element_Text('deptname');
     $deptname->setLabel('Department');
     $deptname->setAttrib('onblur', 'clearautocompletenames(this)');
     $dcode = new Zend_Form_Element_Text('dcode');
     $dcode->setLabel('Code');
     $dcode->setAttrib('class', 'selectoption');
     $dcode->addValidator("regex", true, array('pattern' => '/^([a-zA-Z0-9.\\-]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alpha numeric characters.')));
     $dcode->setAttrib('onblur', 'clearautocompletenames(this)');
     $bname = new Zend_Form_Element_Text('bname');
     $bname->setLabel('Business Unit');
     $bname->addValidator("regex", true, array('pattern' => '/^([a-zA-Z.\\-]+ ?)+$/', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')));
     $bname->setAttrib('onblur', 'clearautocompletenames(this)');
     $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate');
     $startdate->setLabel('Started On');
     $startdate->setAttrib('readonly', 'true');
     $startdate->setOptions(array('class' => 'brdr_none'));
     $country = new Zend_Form_Element_Select('country');
     $country->setLabel('Country');
     $this->addElements(array($deptname, $dcode, $bname, $startdate, $country));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('startdate'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:28,代码来源:departmentsreport.php

示例11: init

 public function init()
 {
     // метод передачи POST
     $this->setMethod('post');
     // формируем массив тем из БД
     $themes = new Application_Model_Themes();
     //подключаем модель тем
     $themes->fillList();
     $options = $themes->getList();
     // id новости
     $this->addElement('hidden', 'id');
     // заголовок новости
     $this->addElement('text', 'title', array('label' => 'Заголовок:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array(array('NotEmpty', true))));
     // текст
     $this->addElement('textarea', 'text', array('label' => 'Текст новости:', 'required' => true, 'validators' => array(array('NotEmpty', true))));
     // выпадающий список тем (массив данных для опций сформирован выше)
     $this->addElement('select', 'theme_id', array('label' => 'Тема:', 'required' => true, 'multiOptions' => $options, 'validators' => array(array('NotEmpty', true))));
     // поле ввода даты, используется JQueryUI (библиотека ZendX)
     $datePicker = new ZendX_JQuery_Form_Element_DatePicker('date', array('jQueryParams' => array('dateFormat' => 'dd.mm.yy')));
     $datePicker->setLabel('Дата:');
     $datePicker->addValidator('NotEmpty');
     $this->addElement($datePicker);
     // кнопка "сохранить"
     $this->addElement('submit', 'submit', array('ignore' => true, 'label' => 'Сохранить'));
 }
开发者ID:murenky,项目名称:example,代码行数:25,代码来源:NewsEdit.php

示例12: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empsalarydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $currencyid = new Zend_Form_Element_Select('currencyid');
     $currencyid->setLabel('Salary Currency');
     $currencyid->setRegisterInArrayValidator(false);
     $salarytype = new Zend_Form_Element_Select('salarytype');
     $salarytype->setLabel("Pay Frequency");
     $salarytype->setAttrib('id', 'jobpayfrequency');
     //$salarytype->setAttrib('onchange', 'changesalarytext(this)');
     $salarytype->setRegisterInArrayValidator(false);
     /* $salarytype->setMultiOptions(array(	
        '' => 'Select Salary Type',
        '1'=>'Yearly' ,
        '2'=>'Hourly',
        )); */
     $salary = new Zend_Form_Element_Text('salary');
     $salary->setLabel("Salary");
     $salary->setAttrib('maxLength', 8);
     $salary->addFilter(new Zend_Filter_StringTrim());
     $salary->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $bankname = new Zend_Form_Element_Text('bankname');
     $bankname->setAttrib('maxlength', 40);
     $bankname->setLabel('Bank Name');
     $bankname->addFilters(array('StringTrim'));
     $bankname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\. ]*$/', 'messages' => array('regexNotMatch' => 'Please enter valid bank name.')));
     $accountholder_name = new Zend_Form_Element_Text('accountholder_name');
     $accountholder_name->setAttrib('maxlength', 40);
     $accountholder_name->setLabel('Account Holder Name');
     $accountholder_name->addFilters(array('StringTrim'));
     $accountholder_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     $accountholding = new ZendX_JQuery_Form_Element_DatePicker('accountholding');
     $accountholding->setLabel('Account Holding Since');
     $accountholding->setAttrib('readonly', 'true');
     $accountholding->setAttrib('onfocus', 'this.blur()');
     $accountholding->setOptions(array('class' => 'brdr_none'));
     $accountclasstypeid = new Zend_Form_Element_Select('accountclasstypeid');
     $accountclasstypeid->setLabel('Account Class Type');
     $accountclasstypeid->setRegisterInArrayValidator(false);
     $bankaccountid = new Zend_Form_Element_Select('bankaccountid');
     $bankaccountid->setLabel('Account Type');
     $bankaccountid->setRegisterInArrayValidator(false);
     $accountnumber = new Zend_Form_Element_Text('accountnumber');
     $accountnumber->setAttrib('maxlength', 20);
     $accountnumber->setLabel('Account Number');
     $accountnumber->addFilters(array('StringTrim'));
     $accountnumber->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9 ]*$/', 'messages' => array('regexNotMatch' => 'Please enter only alphanumeric characters.')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $currencyid, $salarytype, $salary, $bankname, $accountholder_name, $accountholding, $accountclasstypeid, $bankaccountid, $accountnumber, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('accountholding'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:58,代码来源:empsalarydetails.php

示例13: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empjobhistory');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $positionheld = new Zend_Form_Element_Select('positionheld');
     $positionheld->setLabel('Position');
     $positionheld->setRegisterInArrayValidator(false);
     // $positionheld->setRequired(true);
     // $positionheld->addValidator('NotEmpty', false, array('messages' => 'Please select position.'));
     $department = new Zend_Form_Element_Select('department');
     $department->setLabel('Department');
     $department->setRegisterInArrayValidator(false);
     // $department->setRequired(true);
     // $department->addValidator('NotEmpty', false, array('messages' => 'Please select department.'));
     $jobtitleid = new Zend_Form_Element_Select('jobtitleid');
     $jobtitleid->setLabel('Job Title');
     $jobtitleid->setRegisterInArrayValidator(false);
     // $jobtitleid->setRequired(true);
     // $jobtitleid->addValidator('NotEmpty', false, array('messages' => 'Please select job title.'));
     $start_date = new ZendX_JQuery_Form_Element_DatePicker('start_date');
     $start_date->setLabel('From');
     $start_date->setOptions(array('class' => 'brdr_none'));
     $start_date->setAttrib('readonly', 'true');
     $start_date->setAttrib('onfocus', 'this.blur()');
     $start_date->setRequired(true);
     $start_date->addValidator('NotEmpty', false, array('messages' => 'Please enter start date.'));
     $end_date = new ZendX_JQuery_Form_Element_DatePicker('end_date');
     $end_date->setLabel('To');
     $end_date->setOptions(array('class' => 'brdr_none'));
     $end_date->setAttrib('readonly', 'true');
     $end_date->setAttrib('onfocus', 'this.blur()');
     $received_amount = new Zend_Form_Element_Text("received_amount");
     $received_amount->setLabel("Amount Received");
     $received_amount->setAttrib('maxLength', 10);
     $received_amount->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $paid_amount = new Zend_Form_Element_Text("paid_amount");
     $paid_amount->setLabel("Amount Paid");
     $paid_amount->setAttrib('maxLength', 10);
     $paid_amount->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $client = new Zend_Form_Element_Select('client');
     $client->setLabel('Client');
     $client->setRegisterInArrayValidator(false);
     $client->setRequired(true);
     $client->addValidator('NotEmpty', false, array('messages' => 'Please select a client.'));
     $vendor = new Zend_Form_Element_Text("vendor");
     $vendor->setLabel("Vendor");
     $vendor->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.&\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter a valid vendor name.')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $positionheld, $jobtitleid, $department, $start_date, $end_date, $received_amount, $paid_amount, $client, $vendor, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('start_date', 'end_date'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:57,代码来源:empjobhistory.php

示例14: _createDateElement

 private function _createDateElement()
 {
     $date = new ZendX_JQuery_Form_Element_DatePicker('date', array('JQueryParams' => array('dateFormat' => 'dd-mm-yy', 'defaultDate' => time())));
     $date->setAttrib('class', 'span-4');
     $date->setLabel('Ngày đi: ');
     $date->setAttribs(array('class' => 'span-4'));
     $date->getDecorator('Label')->setOption('class', 'span-2 labelDecoratorNav');
     return $date;
 }
开发者ID:rizkioa,项目名称:etak6,代码行数:9,代码来源:Route.php

示例15: _createStartDate

 private function _createStartDate()
 {
     $date = new ZendX_JQuery_Form_Element_DatePicker('startDate', array('JQueryParams' => array('dateFormat' => 'dd-mm-yy', 'defaultDate' => time())));
     $date->setLabel('Ngày bắt đầu chạy: ');
     // get current date
     $date->setValue(TBB_Utility_Date::formatDate(TBB_Utility_Date::getCurrentDate()));
     $date->setAttribs(array('class' => 'span-6'));
     $date->getDecorator('Label')->setOption('class', 'span-4 labelDecorator');
     return $date;
 }
开发者ID:rizkioa,项目名称:etak6,代码行数:10,代码来源:TripCreateMultiple.php


注:本文中的ZendX_JQuery_Form_Element_DatePicker::setLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。