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


PHP Zend_Form_Element_Button::setRequired方法代码示例

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


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

示例1: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'requisition');
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $id = new Zend_Form_Element_Hidden('id');
     $requisition_code = new Zend_Form_Element_Text('requisition_code');
     $requisition_code->setAttrib('title', 'Requisition Code.');
     $requisition_code->setAttrib('readonly', 'readonly');
     $requisition_code->setAttrib('onfocus', 'this.blur()');
     $requisition_code->setRequired(true);
     $requisition_code->addValidator('NotEmpty', false, array('messages' => 'Identity codes are not configured yet.'));
     $onboard_date = new Zend_Form_Element_Text('onboard_date');
     $onboard_date->setAttrib('title', 'Due Date.');
     $onboard_date->setAttrib('maxLength', 10);
     $onboard_date->setAttrib('readonly', 'readonly');
     $onboard_date->setAttrib('onfocus', 'this.blur()');
     $business_unit = new Zend_Form_Element_Select("business_unit");
     $business_unit->setAttrib("class", "formDataElement");
     $business_unit->setAttrib("onchange", "getdepts_req(this,'department','billable_empname');");
     $business_unit->setAttrib('title', 'Business Unit.');
     $business_unit->setRequired(true);
     $business_unit->addValidator('NotEmpty', false, array('messages' => 'Business Unit not configured yet.'));
     //$business_unit->setAttrib('onchange', 'displayEmplistonbusinessunit(this,"billable_empname","req")');
     $department = new Zend_Form_Element_Select("department");
     $department->setAttrib("class", "formDataElement");
     $department->setAttrib('title', 'Department.');
     $department->addMultiOptions(array('' => 'Select Department'));
     $department->setAttrib('onchange', 'displayEmpReportingmanagers(this,"reporting_id","req")');
     /*
      * added New $ipbusiness_unit and $ipdepartment controls
      */
     //start---------------
     $ipbusiness_unit = new Zend_Form_Element_Select("ipbusiness_unit");
     $ipbusiness_unit->setAttrib("class", "formDataElement");
     $ipbusiness_unit->setAttrib("onchange", "getdepts_req(this,'ipdepartment','position_id');");
     $ipbusiness_unit->setAttrib('title', 'Business Unit.');
     $ipdepartment = new Zend_Form_Element_Select("ipdepartment");
     $ipdepartment->setAttrib("class", "formDataElement");
     $ipdepartment->setAttrib('title', 'Department.');
     $ipdepartment->addMultiOptions(array('' => 'Select Department'));
     $ipdepartment->setAttrib('onchange', 'displayEmpReportingmanagers(this,"ipreporting_id","req")');
     $ipdepartment->setRegisterInArrayValidator(false);
     //$ipdepartment->setRequired(true);
     $ipdepartment->addValidator('NotEmpty', false, array('messages' => 'Please select department.'));
     //$ipreporting_id = new Zend_Form_Element_Select("ipreporting_id");
     $ipreporting_id = new Zend_Form_Element_Multiselect("ipreporting_id");
     $ipreporting_id->setAttrib('title', 'Interview Panel Member.');
     $ipreporting_id->setAttrib("class", "formDataElement");
     $ipreporting_id->addMultiOptions(array('' => 'Select Interview Panel Member'));
     $ipreporting_id->setRegisterInArrayValidator(false);
     $ipreporting_id->setRequired(true);
     $ipreporting_id->addValidator('NotEmpty', false, array('messages' => 'Please select Interview Panel Member.'));
     $technicalskill_id = new Zend_Form_Element_Multiselect("technicalskill_id");
     $technicalskill_id->setAttrib('title', 'Technical Skill');
     $technicalskill_id->setAttrib("class", "formDataElement");
     $technicalskill_id->addMultiOptions(array('' => 'Select Technical Skill'));
     $technicalskill_id->setRegisterInArrayValidator(false);
     $technicalskill_id->setRequired(true);
     $technicalskill_id->addValidator('NotEmpty', false, array('messages' => 'Please select Technical Skill.'));
     $nontechnicalskill_id = new Zend_Form_Element_Multiselect("nontechnicalskill_id");
     $nontechnicalskill_id->setAttrib('title', 'Non-Technical Skill');
     $nontechnicalskill_id->setAttrib("class", "formDataElement");
     $nontechnicalskill_id->addMultiOptions(array('' => 'Select Non-Technical Skill'));
     $nontechnicalskill_id->setRegisterInArrayValidator(false);
     $nontechnicalskill_id->setRequired(true);
     $nontechnicalskill_id->addValidator('NotEmpty', false, array('messages' => 'Please select Non-Technical Skill.'));
     //end---------------
     $jobtitle = new Zend_Form_Element_Select("jobtitle");
     $jobtitle->setAttrib("class", "formDataElement");
     $jobtitle->setAttrib("onchange", "getpositions_req('department','business_unit','position_id','jobtitle');");
     $jobtitle->setAttrib('title', 'Job Title.');
     $reporting_id = new Zend_Form_Element_Select("reporting_id");
     $reporting_id->setAttrib('title', 'Reporting Manager.');
     $reporting_id->setRegisterInArrayValidator(false);
     $reporting_id->addMultiOptions(array('' => 'Select Reporting Manager'));
     $position_id = new Zend_Form_Element_Select("position_id");
     $position_id->setAttrib("class", "formDataElement");
     $position_id->setAttrib('title', 'Position.');
     $position_id->addMultiOptions(array('' => 'Select Position'));
     $req_no_positions = new Zend_Form_Element_Text('req_no_positions');
     $req_no_positions->setAttrib('maxLength', 4);
     $req_no_positions->setAttrib('title', 'Required no.of positions.');
     $req_no_positions->addFilter(new Zend_Filter_StringTrim());
     $jobdescription = new Zend_Form_Element_Textarea('jobdescription');
     $jobdescription->setAttrib('rows', 10);
     $jobdescription->setAttrib('cols', 50);
     $jobdescription->setAttrib('title', 'Job description.');
     $jobdescription->addValidator('NotEmpty', false, array('messages' => 'Please select Job Description document.'));
     $uploadjd = new Zend_Form_Element_Button('requ_jd');
     $uploadjd->setAttrib('title', 'Job description.');
     $uploadjd->setRequired(true);
     $uploadjd->addValidator('NotEmpty', false, array('messages' => 'Please Upload Job Description document.'));
     $req_skills = new Zend_Form_Element_Textarea('req_skills');
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:Requisition.php


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