本文整理汇总了PHP中Zend_Form_Element_Checkbox::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Checkbox::setValue方法的具体用法?PHP Zend_Form_Element_Checkbox::setValue怎么用?PHP Zend_Form_Element_Checkbox::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Checkbox
的用法示例。
在下文中一共展示了Zend_Form_Element_Checkbox::setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($options = null)
{
$this->_disabledDefaultActions = true;
$this->_addRequiredAsterisks = false;
parent::__construct($options);
$baseDir = $this->getView()->baseUrl();
$this->getView()->headLink()->appendStylesheet("{$this->getView()->baseUrl()}/themes/default/css/login.css", 'all');
$this->setAttrib('class', 'login');
$regexValidate = new Cible_Validate_Email();
$regexValidate->setMessage($this->getView()->getCibleText('validation_message_emailAddressInvalid'), 'regexNotMatch');
$email = new Zend_Form_Element_Text('email');
$email->setLabel($this->getView()->getClientText('login_form_email_label'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToLower')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->addValidator($regexValidate)->setAttrib('class', 'loginTextInput');
$this->addElement($email);
$password = new Zend_Form_Element_Password('password');
$password->setLabel($this->getView()->getClientText('login_form_password_label'))->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'loginTextInput')->setRequired(true)->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))));
$this->addElement($password);
// checkbox for client persistance
$status = new Zend_Form_Element_Checkbox('stayOn');
$status->setLabel($this->getView()->getClientText('login_form_stayOn_label'));
$status->setValue(1);
$status->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd'))));
$this->addElement($status);
// Submit button
$submit = new Zend_Form_Element_Submit('submit_login');
$submit->setLabel('')->setAttrib('class', 'subscribeButton-' . Zend_Registry::get("languageSuffix"));
$submit->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd'))));
$this->addElement($submit);
$this->setAttrib('class', 'login-form');
}
示例2: init
public function init()
{
$obj = new Application_Model_DbTable_Text();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('idtext', $primaryKey);
$this->setAction('/admin/text/new');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('estado');
$e->setValue(true);
$this->addElement($e);
$e = new Zend_Form_Element_Text('url');
$this->addElement($e);
$e = new Zend_Form_Element_Text('descripcion');
$this->addElement($e);
$e = new Zend_Form_Element_Text('alt');
$this->addElement($e);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例3: init
public function init()
{
$obj = new Application_Model_DbTable_Link();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('idlink', $primaryKey);
$this->setAction('/link/index');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('chkEstado[]');
$e->setValue(true);
$this->addElement($e);
$e = new Zend_Form_Element_Text('txtTitulo[]');
$this->addElement($e);
$e = new Zend_Form_Element_Text('txtLink[]');
$this->addElement($e);
$e = new Zend_Form_Element_Hidden('txtImagen[]');
$this->addElement($e);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例4: init
public function init()
{
$seoFilter = new Core_Utils_SeoUrl();
$objProj = new Admin_Model_Project();
$obj = new Application_Model_DbTable_Banner();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('idbanner', $primaryKey);
$this->setAction('/banner/new');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$e = new Zend_Form_Element_Select('codproy');
$e->setMultiOptions($objProj->getFetchPairsAllProjects());
$this->addElement($e);
$i = new Zend_Form_Element_File('nombre');
$this->addElement($i);
$this->getElement('nombre')->setDestination(ROOT_IMG_DINAMIC . '/banner/origin/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
$e = new Zend_Form_Element_Text('titulo');
$this->addElement($e);
$e = new Zend_Form_Element_Textarea('descripcion');
$this->addElement($e);
$e = new Zend_Form_Element_Text('fechainicio');
$this->addElement($e);
$e = new Zend_Form_Element_Text('fechafin');
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('vchestado');
$e->setValue(true);
$this->addElement($e);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例5: init
public function init()
{
$this->setName(strtolower(get_class()));
$this->setMethod("post");
$oFormName = new Zend_Form_Element_Hidden("form_name");
$oFormName->setValue(get_class());
$oFormName->setIgnore(FALSE)->removeDecorator("Label");
$this->addElement($oFormName);
$oMessage = new Zend_Form_Element_Textarea("message");
$oMessage->setFilters($this->_aFilters);
$oMessage->setRequired(FALSE);
$oMessage->removeDecorator("label");
$this->addElement($oMessage);
$oIsDing = new Zend_Form_Element_Checkbox("is_ding");
$oIsDing->setLabel("Włącz dźwięk");
$oIsDing->setValue(1);
$this->addElement($oIsDing);
$oSubmit = new Zend_Form_Element_Submit("send_message");
$oSubmit->setLabel("Wyślij wiadomość");
$this->addElement($oSubmit);
$oViewScript = new Zend_Form_Decorator_ViewScript();
$oViewScript->setViewModule("admin");
$oViewScript->setViewScript("_forms/chat.phtml");
$this->clearDecorators();
$this->setDecorators(array(array($oViewScript)));
$oElements = $this->getElements();
foreach ($oElements as $oElement) {
$oElement->setFilters($this->_aFilters);
$oElement->removeDecorator("Errors");
}
}
示例6: init
public function init()
{
$obj = new Application_Model_DbTable_Juego();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('idjuego', $primaryKey);
$this->setAction('/admin/juego/new');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('estado');
$e->setValue(true);
$this->addElement($e);
$e = new Zend_Form_Element_Text('url');
$this->addElement($e);
$e = new Zend_Form_Element_Text('nombre');
$this->addElement($e);
$i = new Zend_Form_Element_File('avanzado');
$this->addElement($i);
$this->getElement('avanzado')->setDestination(ROOT_IMG_DINAMIC . '/juego/avanzado/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
$i = new Zend_Form_Element_File('basico360');
$this->addElement($i);
$this->getElement('basico360')->setDestination(ROOT_IMG_DINAMIC . '/juego/basico360/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例7: renderFormElement
public function renderFormElement()
{
$elm = new Zend_Form_Element_Checkbox($this->getName(), array('label' => $this->getLabel() . ':'));
$elm->setDescription($this->getDescription());
$elm->setValue($this->getValue());
$elm->setRequired($this->getRequired());
return $elm;
}
示例8: frm_table_time_charge
public function frm_table_time_charge($data = null)
{
$menu_code = new Zend_Form_Element_Text('menu_code');
$menu_code->setAttribs(array('class' => 'form-control'));
$description = new Zend_Form_Element_Text('description');
$description->setAttribs(array('class' => 'form-control', 'required' => true));
$amount_to_charge = new Zend_Form_Element_Text('amount_to_charge');
$amount_to_charge->setAttribs(array('class' => 'form-control'));
$free_amt = new Zend_Form_Element_Text('free_amt');
$free_amt->setAttribs(array('class' => 'form-control'));
$child = new Zend_Form_Element_Text('child');
$child->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
$show_description = new Zend_Form_Element_Text('show_description');
$show_description->setAttribs(array('class' => 'form-control'));
$photo = new Zend_Form_Element_File('photo');
$background = new Zend_Form_Element_Text('background');
$background->setAttribs(array('class' => 'form-control color-picker-rgba'));
$font_color = new Zend_Form_Element_Text('font_color');
$font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
$interval_time = new Zend_Form_Element_Text('interval_time');
$interval_time->setAttribs(array('class' => 'form-control'));
$apply = new Zend_Form_Element_Select('apply');
$apply->setAttribs(array('class' => 'form-control'));
$apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
$apply->setMultiOptions($apply_opt);
$combo = new Zend_Form_Element_Checkbox('combo');
$combo->setAttribs(array('class' => 'red'));
$active = new Zend_Form_Element_Checkbox('active');
$active->setAttribs(array('class' => 'form-control'));
$execute_number = new Zend_Form_Element_Text('execute_number');
$execute_number->setAttribs(array('class' => 'form-control'));
$setting = new Zend_Form_Element_Select('setting');
$setting->setAttribs(array('class' => 'form-control'));
$setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
$setting->setMultiOptions($setting_opt);
$arrange = new Zend_Form_Element_Text('arrange');
$arrange->setAttribs(array('class' => 'form-control'));
$resize = new Zend_Form_Element_Text('resize');
$resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
$note = new Zend_Form_Element_Textarea('note');
$note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
$id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
// print_r($data);
$id->setValue($data['id']);
$description->setValue($data['description']);
$interval_time->setValue($data['time_interval']);
$execute_number->setValue($data['execute_amount']);
$amount_to_charge->setValue($data['fee_charge']);
$free_amt->setValue($data['free_amount']);
$child->setValue($data['chil_per']);
$active->setValue($data['nul_mul']);
}
$this->addElements(array($id, $apply, $active, $combo, $menu_code, $description, $amount_to_charge, $free_amt, $child, $show_description, $background, $font_color, $interval_time, $execute_number, $setting, $arrange, $resize, $note));
return $this;
}
示例9: _prepareForm
/**
* Builds a form form data
* @return unknown_type
*/
private function _prepareForm()
{
!isset($this->_options) ? $this->_options = array() : null;
!isset($this->_options[self::DATA]) ? $this->_options[self::DATA] = array() : null;
$action = $this->_options[self::ACTION];
$model = $this->_options[self::MODEL];
$this->setAction($action);
$this->setMethod('post');
foreach ($this->_options[self::DATA] as $fieldName => $fieldValue) {
if ($model->isLocked($fieldName)) {
continue;
}
$typeElement = $model->getTypeElement($fieldName);
try {
if ($typeElement == Fgsl_Form_Constants::TEXT) {
$text = new Zend_Form_Element_Text($fieldName);
}
if ($typeElement == Fgsl_Form_Constants::PASSWORD) {
$text = new Zend_Form_Element_Password($fieldName);
}
if ($typeElement == Fgsl_Form_Constants::SELECT) {
$text = new Zend_Form_Element_Select($fieldName);
$selectOptions = $model->getSelectOptions($fieldName);
$text->addMultiOptions($selectOptions);
}
if ($typeElement == Fgsl_Form_Constants::CHECKBOX) {
$text = new Zend_Form_Element_Checkbox($fieldName);
}
$text->setLabel($model->getFieldLabel($fieldName));
isset($this->_options[self::DATA][$fieldName]) ? $text->setValue($this->_options[self::DATA][$fieldName]) : '';
if (isset($this->_options['readonly'])) {
if (array_key_exists($fieldName, $this->_options['readonly'])) {
$text->setAttrib('readonly', 'readonly');
}
}
$this->addElement($text);
} catch (Exception $e) {
return null;
}
}
/**
* Stores primary key value into a HTML hidden element
*/
if ($this->_options[self::DATA][$model->getFieldKey()] !== '') {
$text = new Zend_Form_Element_Hidden($model->getFieldKey());
$text->setValue($model->getKeyValue($this->_options[self::DATA]));
$this->addElement($text);
}
$formType = $this->_options[self::DATA][$model->getFieldKey()] === '' ? $this->_getLabel(self::INSERT_LABEL) : $this->_getLabel(self::EDIT_LABEL);
$text = new Zend_Form_Element_Submit(ucfirst($formType));
$this->addElement($text);
$text = new Zend_Form_Element_Submit('Return');
$text->setAttrib('name', 'return');
$this->addElement($text);
return $this;
}
示例10: setValue
/**
* @see Zend_Form_Element_Checkbox::setValue
*/
public function setValue($value)
{
if ('on' === $value) {
$this->_value = $this->getCheckedValue();
$this->checked = true;
return $this;
} else {
return parent::setValue($value);
}
}
示例11: init
public function init()
{
parent::init();
$element = new Zend_Form_Element_Checkbox('useExisting');
$element->setRequired(true);
$element->setValue(1);
$element->setLabel('Use existing image:');
$this->useExisting = $element;
$this->addElement('hidden', 'existingFilename', array('required' => true, 'ignore' => false, 'decorators' => array('ViewHelper')));
}
示例12: init
public function init()
{
$obj = new Application_Model_DbTable_User();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('iduser', $primaryKey);
$this->setAction('/admin/usuarios/edit');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$objType = new Admin_Model_Role();
$e = new Zend_Form_Element_Select('idrol');
$e->setMultiOptions($objType->getRoleAll());
$this->addElement($e);
$e = new Zend_Form_Element_Text('email');
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'Correo');
$this->addElement($e);
$e = new Zend_Form_Element_Text('login');
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'usuario');
$this->addElement($e);
$e = new Zend_Form_Element_Text('name');
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'nombre');
$this->addElement($e);
$e = new Zend_Form_Element_Text('apepat');
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'Apellido Paterno');
$this->addElement($e);
$e = new Zend_Form_Element_Text('apemat');
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'Apellido Materno');
$this->addElement($e);
$e = new Zend_Form_Element_Submit('Guardar');
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('state');
$e->setValue(true);
$this->addElement($e);
$e = new Zend_Form_Element_Password('confirmone');
$e->setRequired(false);
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'Contraseña');
$this->addElement($e);
$e = new Zend_Form_Element_Password('confirmtwo');
$e->setRequired(false);
$e->setAttrib('class', 'inpt-medium');
$e->setAttrib('placeholder', 'Repetir Contraseña');
$this->addElement($e);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例13: __construct
public function __construct($options = null)
{
$this->_addSubmitSaveClose = false;
parent::__construct($options);
$galleryID = $options['galleryID'];
$imageSrc = "";
// show online
$showOnline = new Zend_Form_Element_Checkbox('GI_Online');
$showOnline->setValue(1);
$showOnline->setLabel($this->getView()->getCibleText('form_label_showOnline'));
$showOnline->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
$this->addElement($showOnline);
// image position
$position = new Zend_Form_Element_Text('GI_Position');
$position->setLabel($this->getView()->getCibleText('form_label_position'));
$position->setRequired(true);
$position->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))));
$position->addValidator('Int', true, array('messages' => array('notInt' => $this->getView()->getCibleText('validation_message_int_field'))));
$this->addElement($position);
// IMAGE
/*
$imageSrc = "";
$imageView = new Zend_Form_Element_Image('imageView',array('src' => $imageSrc));
$imageView->setOrder(4);
$this->addElement($imageView);
*/
if ($galleryID != "") {
$imageTmp = new Zend_Form_Element_Hidden('ImageSrc_tmp');
$imageTmp->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'openOnly' => true))));
$this->addElement($imageTmp);
$imageOrg = new Zend_Form_Element_Hidden('ImageSrc_original');
$imageOrg->setDecorators(array('ViewHelper'));
$this->addElement($imageOrg);
$imageView = new Zend_Form_Element_Image('ImageSrc_preview', array('src' => $imageSrc, 'onclick' => 'return false;'));
$imageView->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'closeOnly' => true))));
$this->addElement($imageView);
$imagePicker = new Cible_Form_Element_ImageGalleryPicker('ImageSrc', array('associatedElement' => 'imageView', 'galleryID' => $galleryID));
$imagePicker->removeDecorator('label');
$this->addElement($imagePicker);
}
// Title
$title = new Zend_Form_Element_Text('II_Title');
$title->setLabel($this->getView()->getCibleText('form_label_title'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
$this->addElement($title);
// Description
$title = new Zend_Form_Element_Text('II_Description');
$title->setLabel($this->getView()->getCibleText('form_label_description'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
$this->addElement($title);
}
示例14: init
public function init()
{
$obj = new Application_Model_DbTable_Banner();
$primaryKey = $obj->getPrimaryKey();
$this->setMethod('post');
$this->setEnctype('multipart/form-data');
$this->setAttrib('idtCp', $primaryKey);
$this->setAction('/cp/new');
$e = new Zend_Form_Element_Hidden($primaryKey);
$this->addElement($e);
$e = new Zend_Form_Element_Select('posicion');
$e->setMultiOptions(array(1 => 'BANNER 1', 2 => 'BANNER 2', 3 => 'BANNER 3', 4 => 'BANNER 4', 5 => 'BANNER 5', 6 => 'BANNER 6', 7 => 'BANNER 7', 8 => 'BANNER 8', 9 => 'BANNER 9', 10 => 'BANNER 10'));
$this->addElement($e);
$e = new Zend_Form_Element_Checkbox('estado');
$e->setValue(true);
$this->addElement($e);
$e = new Zend_Form_Element_Text('descripcion');
$this->addElement($e);
$e = new Zend_Form_Element_Text('enlace');
$this->addElement($e);
$e = new Zend_Form_Element_Text('alt');
$this->addElement($e);
$i = new Zend_Form_Element_File('avanzado');
$this->addElement($i);
$this->getElement('avanzado')->setDestination(ROOT_IMG_DINAMIC . '/banners/avanzado/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
//
// $i = new Zend_Form_Element_Image('submitImage');
// $this->addElement($i);
// $this->getElement('submitImage')
// ->setImage(ROOT_IMG_DINAMIC . '/banners/avanzado/nxqbhjpgckomuzi.gif');
//
//
$i = new Zend_Form_Element_File('basico128');
$this->addElement($i);
$this->getElement('basico128')->setDestination(ROOT_IMG_DINAMIC . '/banners/basico128/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
$i = new Zend_Form_Element_File('basico240');
$this->addElement($i);
$this->getElement('basico240')->setDestination(ROOT_IMG_DINAMIC . '/banners/basico240/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
$i = new Zend_Form_Element_File('basico360');
$this->addElement($i);
$this->getElement('basico360')->setDestination(ROOT_IMG_DINAMIC . '/banners/basico360/')->addValidator('Size', false, 10024000)->addValidator('Extension', true, 'jpg,png,gif,jpeg')->setRequired(false);
foreach ($this->getElements() as $element) {
$element->removeDecorator('Label');
$element->removeDecorator('DtDdWrapper');
$element->removeDecorator('HtmlTag');
}
}
示例15: __construct
public function __construct($options = null)
{
parent::__construct($options);
$moduleID = -1;
$moduleName = '';
if (!empty($options['moduleID'])) {
$moduleID = $options['moduleID'];
$moduleName = Cible_FunctionsModules::getModuleNameByID($moduleID);
}
// input text for the title of the text module
$categoryTitle = new Zend_Form_Element_Text('Title');
$categoryTitle->setLabel($this->getView()->getCibleText('form_category_title_label'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->_view->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
$label = $categoryTitle->getDecorator('Label');
$label->setOption('class', $this->_labelCSS);
$this->addElement($categoryTitle);
$categoryDescription = new Zend_Form_Element_Textarea('WordingShowAllRecords');
$categoryDescription->setLabel($this->_view->getCibleText('form_category_view_all_label'))->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'stdTextarea');
$label = $categoryDescription->getDecorator('Label');
$label->setOption('class', $this->_labelCSS);
$this->addElement($categoryDescription);
$views = Cible_FunctionsCategories::getCategoryViews($moduleID);
foreach ($views as $view) {
$pickerName = $view['MV_Name'];
$controllerName = new Zend_Form_Element_Text("{$pickerName}_controllerName");
$controllerName->setLabel($this->getView()->getCibleText("form_select_option_view_{$moduleName}_{$pickerName}"))->setAttrib('onfocus', "openPagePicker('page-picker-{$pickerName}');");
$this->addElement($controllerName);
$pagePicker = new Cible_Form_Element_PagePicker("{$pickerName}_pageID", array('associatedElement' => "{$pickerName}_controllerName", 'onclick' => "javascript:closePagePicker(\"page-picker-{$pickerName}\")"));
$pagePicker->setLabel($this->_view->getCibleText('form_category_associated_page_label'));
$pagePicker->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => "page-picker", 'id' => "page-picker-{$pickerName}"))));
$this->addElement($pagePicker);
}
// Check if want to put that category in the RSS Feed
$showInRss = new Zend_Form_Element_Checkbox('ShowInRss');
$showInRss->setValue(1);
$showInRss->setLabel($this->_view->getCibleText('form_category_add_to_rss_label'));
$showInRss->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
$this->addElement($showInRss);
// How many last news in the RSS Feed
$rssItemsCount = new Zend_Form_Element_Text('RssItemsCount');
$rssItemsCount->setLabel($this->getView()->getCibleText('form_category_how_many_items_for_rss_label'))->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->_view->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'shortTextInput');
$this->addElement($rssItemsCount);
$module = new Zend_Form_Element_Hidden('ModuleID');
$module->setValue($moduleID)->removeDecorator('label')->removeDecorator('DtDdWrapper');
$this->addElement($module);
}