本文整理汇总了PHP中Zend_Dojo_Form_Element_TextBox::setAttrib方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo_Form_Element_TextBox::setAttrib方法的具体用法?PHP Zend_Dojo_Form_Element_TextBox::setAttrib怎么用?PHP Zend_Dojo_Form_Element_TextBox::setAttrib使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Dojo_Form_Element_TextBox
的用法示例。
在下文中一共展示了Zend_Dojo_Form_Element_TextBox::setAttrib方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($options = null)
{
Zend_Dojo::enableForm($this);
parent::__construct($options);
$product_id = new Zend_Dojo_Form_Element_ComboBox('product_id');
$product_id->addMultiOption('', 'Select...');
$product_id->setAttrib('class', 'txt_put');
$product_id->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproductname = new Zend_Dojo_Form_Element_ValidationTextBox('offerproductname');
$offerproductname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductname'));
$offerproductname->setAttrib('class', 'txt_put');
$offerproductname->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproductshortname = new Zend_Dojo_Form_Element_ValidationTextBox('offerproductshortname');
$offerproductshortname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductshortname'));
$offerproductshortname->setAttrib('class', 'txt_put');
$offerproductshortname->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproduct_description = new Zend_Dojo_Form_Element_SimpleTextarea('offerproduct_description', array('rows' => 3, 'cols' => 20));
$offerproduct_description->setAttrib('class', '');
$offerproduct_description->setRequired(true)->addValidators(array(array('NotEmpty')));
// $begindate = new Zend_Dojo_Form_Element_DateTextBox('begindate');
// $begindate->setLabel('Birthday');
$begindate = new ZendX_JQuery_Form_Element_DatePicker('begindate', array('label' => 'Date:'));
$begindate->setJQueryParam('dateFormat', 'yy-mm-dd');
$begindate->setAttrib('class', 'txt_put');
$begindate->setRequired(true)->addValidators(array(array('Date', true, array('messages' => array('dateNotYYYY-MM-DD' => 'Please enter in this format(YYYY-MM-DD)', 'dateInvalid' => "'%value%' is not a valid date Please enter in this format(YYYY-MM-DD)"))), array('Between', false, array($beginDate, $matureDate, 'messages' => array('notBetween' => 'date should be between ' . $beginDate . ' to (Closed date) ' . $matureDate)))));
$minmumloanamount = new Zend_Dojo_Form_Element_NumberSpinner('minmumloanamount', array('value' => '7', 'label' => 'NumberSpinner', 'smallDelta' => 5, 'largeDelta' => 25, 'defaultTimeout' => 500, 'timeoutChangeRate' => 100, 'min' => 9, 'max' => 1550, 'places' => 0, 'maxlength' => 20));
$minmumloanamount->setAttrib('class', 'txt_put');
$minmumloanamount->setRequired(true)->addValidators(array(array('NotEmpty')));
$closedate = new Zend_Dojo_Form_Element_TextBox('closedate');
$closedate->setAttrib('class', 'txt_put');
$closedate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true)->addValidator(new Zend_Validate_GreaterThan($begindate));
$applicableto = new Zend_Dojo_Form_Element_ComboBox('applicableto');
$applicableto->addMultiOption('', 'Select...');
$applicableto->setAttrib('class', 'txt_put');
$applicableto->setRequired(true)->addValidators(array(array('NotEmpty')));
$maximunloanamount = new Zend_Dojo_Form_Element_NumberTextBox('maximunloanamount');
$maximunloanamount->setAttrib('class', 'txt_put');
$maximunloanamount->setRequired(true);
$validator = new Zend_Validate_Digits();
$maximunloanamount->addValidator($validator, true);
$minimumfrequency = new Zend_Dojo_Form_Element_NumberTextBox('minimumfrequency');
$minimumfrequency->setAttrib('class', 'txt_put');
$minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
$maximumfrequency = new Zend_Dojo_Form_Element_NumberTextBox('maximumfrequency');
$maximumfrequency->setAttrib('class', 'txt_put');
$maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
$graceperiodnumber = new Zend_Dojo_Form_Element_NumberTextBox('graceperiodnumber');
$graceperiodnumber->setAttrib('class', 'txt_put');
$graceperiodnumber->setRequired(true)->addValidators(array(array('NotEmpty')));
$submit = new Zend_Dojo_Form_Element_SubmitButton('Submit');
$this->addElements(array($offerproductname, $offerproductshortname, $offerproduct_description, $begindate, $closedate, $applicableto, $minmumloanamount, $maximunloanamount, $minimumfrequency, $maximumfrequency, $graceperiodnumber, $product_id, $submit));
}
示例2: __construct
public function __construct($options = null)
{
Zend_Dojo::enableForm($this);
parent::__construct($options);
$product_id = new Zend_Dojo_Form_Element_ComboBox('product_id');
$product_id->addMultiOption('', 'Select...');
$product_id->setAttrib('class', 'txt_put');
$product_id->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproductname = new Zend_Dojo_Form_Element_TextBox('offerproductname');
$offerproductname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductname'));
$offerproductname->setAttrib('class', 'txt_put');
$offerproductname->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproductshortname = new Zend_Dojo_Form_Element_TextBox('offerproductshortname');
$offerproductshortname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productsofferdetails', 'offerproductshortname'));
$offerproductshortname->setAttrib('class', 'txt_put');
$offerproductshortname->setRequired(true)->addValidators(array(array('NotEmpty')));
$offerproduct_description = new Zend_Dojo_Form_Element_SimpleTextarea('offerproduct_description', array('rows' => 3, 'cols' => 20));
$offerproduct_description->setAttrib('class', '');
$offerproduct_description->setRequired(true)->addValidators(array(array('NotEmpty')));
$begindate = new Zend_Dojo_Form_Element_DateTextBox('begindate');
$begindate->setLabel('Birthday');
$minmumloanamount = new Zend_Dojo_Form_Element_NumberSpinner('minmumloanamount', array('value' => '7', 'label' => 'NumberSpinner', 'smallDelta' => 5, 'largeDelta' => 25, 'defaultTimeout' => 500, 'timeoutChangeRate' => 100, 'min' => 9, 'max' => 1550, 'places' => 0, 'maxlength' => 20));
$minmumloanamount->setAttrib('class', 'txt_put');
$minmumloanamount->setRequired(true)->addValidators(array(array('NotEmpty')));
$closedate = new Zend_Dojo_Form_Element_TextBox('closedate');
$closedate->setAttrib('class', 'txt_put');
$closedate->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true)->addValidator(new Zend_Validate_GreaterThan($begindate));
$applicableto = new Zend_Dojo_Form_Element_ComboBox('applicableto');
$applicableto->addMultiOption('', 'Select...');
$applicableto->setAttrib('class', 'txt_put');
$applicableto->setRequired(true)->addValidators(array(array('NotEmpty')));
$maximunloanamount = new Zend_Dojo_Form_Element_TextBox('maximunloanamount');
$maximunloanamount->setAttrib('class', 'txt_put');
$maximunloanamount->setRequired(true);
$validator = new Zend_Validate_Digits();
$maximunloanamount->addValidator($validator, true);
$minimumfrequency = new Zend_Dojo_Form_Element_TextBox('minimumfrequency');
$minimumfrequency->setAttrib('class', 'txt_put');
$minimumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
$maximumfrequency = new Zend_Dojo_Form_Element_TextBox('maximumfrequency');
$maximumfrequency->setAttrib('class', 'txt_put');
$maximumfrequency->setRequired(true)->addValidators(array(array('NotEmpty')));
$graceperiodnumber = new Zend_Dojo_Form_Element_TextBox('graceperiodnumber');
$graceperiodnumber->setAttrib('class', 'txt_put');
$graceperiodnumber->setRequired(true)->addValidators(array(array('NotEmpty')));
$submit = new Zend_Dojo_Form_Element_SubmitButton('Submit');
$this->addElements(array($offerproductname, $offerproductshortname, $offerproduct_description, $begindate, $closedate, $applicableto, $minmumloanamount, $maximunloanamount, $minimumfrequency, $maximumfrequency, $graceperiodnumber, $product_id, $submit));
}
示例3: FrmAddSetting
public function FrmAddSetting($_data = null)
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$_keyname = new Zend_Dojo_Form_Element_TextBox('key_name');
$_keyname->setAttribs(array('dojoType' => $this->validate, 'required' => 'true', 'class' => 'full', 'placeholder' => $this->tr->translate("INPUT_KEY_SETTING")));
$_keyvalue = new Zend_Dojo_Form_Element_TextBox('key_value');
$_keyvalue->setAttribs(array('dojoType' => $this->validate, 'class' => 'full', 'required' => 'true', 'placeholder' => $this->tr->translate("INPUT_VALUE_SETTING")));
$_id = new Zend_Form_Element_Hidden('id');
$this->addElements(array($_keyname, $_keyvalue, $_id));
if (!empty($_data)) {
$_id->setValue($_data['code']);
$_keyname->setValue($_data['keyName']);
$_keyname->setAttrib("ReadOnly", true);
$_keyvalue->setValue($_data['keyValue']);
}
return $this;
}