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


PHP Zend_Form_Element_Select::setDecorators方法代码示例

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


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

示例1: init

 public function init()
 {
     // contato_nome
     $contato_nome = new Zend_Form_Element_Text("contato_nome");
     $contato_nome->setLabel("Nome");
     $contato_nome->setRequired();
     $contato_nome->setAttribs(array('class' => 'form-control'));
     $contato_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // contato_email
     $contato_email = new Zend_Form_Element_Text("contato_email");
     $contato_email->setLabel("E-mail");
     $contato_email->setRequired();
     $contato_email->setAttribs(array('class' => 'form-control'));
     $contato_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // contato_assunto
     $contato_assunto = new Zend_Form_Element_Select("contato_assunto");
     $contato_assunto->setLabel("Assunto");
     $contato_assunto->setRequired();
     $contato_assunto->setAttribs(array('class' => 'form-control'));
     $contato_assunto->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $contato_assunto->setMultiOptions(array("" => "Selecione o assunto...", "Informação" => "Informação", "Elogio" => "Eologio", "Crítica" => "Crítica", "Sugestão" => "Sugestão", "Outros" => "Outros"));
     // contato_mensagem
     $contato_mensagem = new Zend_Form_Element_Textarea("contato_mensagem");
     $contato_mensagem->setLabel("mensagem");
     $contato_mensagem->setRequired();
     $contato_mensagem->setAttribs(array('class' => 'form-control', 'rows' => 5));
     $contato_mensagem->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $this->addElements(array($contato_nome, $contato_email, $contato_assunto, $contato_mensagem));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:naopresta,代码行数:30,代码来源:Contato.php

示例2: init

 public function init()
 {
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/preferences_soundcloud.phtml'))));
     //enable soundcloud uploads
     $this->addElement('checkbox', 'UseSoundCloud', array('label' => 'Upload Recorded Shows To SoundCloud', 'required' => false, 'value' => Application_Model_Preference::GetDoSoundCloudUpload(), 'decorators' => array('ViewHelper')));
     //SoundCloud Username
     $this->addElement('text', 'SoundCloudUser', array('class' => 'input_text', 'label' => 'SoundCloud Email:', 'required' => false, 'filters' => array('StringTrim'), 'value' => Application_Model_Preference::GetSoundCloudUser(), 'decorators' => array('ViewHelper')));
     //SoundCloud Password
     $this->addElement('password', 'SoundCloudPassword', array('class' => 'input_text', 'label' => 'SoundCloud Password:', 'required' => false, 'filters' => array('StringTrim'), 'value' => Application_Model_Preference::GetSoundCloudPassword(), 'decorators' => array('ViewHelper')));
     // Add the description element
     $this->addElement('textarea', 'SoundCloudTags', array('label' => 'SoundCloud Tags: (separate tags with spaces)', 'required' => false, 'class' => 'input_text_area', 'value' => Application_Model_Preference::GetSoundCloudTags(), 'decorators' => array('ViewHelper')));
     //SoundCloud default genre
     $this->addElement('text', 'SoundCloudGenre', array('class' => 'input_text', 'label' => 'Default Genre:', 'required' => false, 'filters' => array('StringTrim'), 'value' => Application_Model_Preference::GetSoundCloudGenre(), 'decorators' => array('ViewHelper')));
     $select = new Zend_Form_Element_Select('SoundCloudTrackType');
     $select->setLabel('Default Track Type:');
     $select->setAttrib('class', 'input_select');
     $select->setMultiOptions(array("" => "", "original" => "Original", "remix" => "Remix", "live" => "Live", "recording" => "Recording", "spoken" => "Spoken", "podcast" => "Podcast", "demo" => "Demo", "in progress" => "Work in progress", "stem" => "Stem", "loop" => "Loop", "sound effect" => "Sound Effect", "sample" => "One Shot Sample", "other" => "Other"));
     $select->setRequired(false);
     $select->setValue(Application_Model_Preference::GetSoundCloudTrackType());
     $select->setDecorators(array('ViewHelper'));
     $this->addElement($select);
     $select = new Zend_Form_Element_Select('SoundCloudLicense');
     $select->setLabel('Default License:');
     $select->setAttrib('class', 'input_select');
     $select->setMultiOptions(array("" => "", "no-rights-reserved" => "The work is in the public domain", "all-rights-reserved" => "All rights are reserved", "cc-by" => "Creative Commons Attribution", "cc-by-nc" => "Creative Commons Attribution Noncommercial", "cc-by-nd" => "Creative Commons Attribution No Derivative Works", "cc-by-sa" => "Creative Commons Attribution Share Alike", "cc-by-nc-nd" => "Creative Commons Attribution Noncommercial Non Derivate Works", "cc-by-nc-sa" => "Creative Commons Attribution Noncommercial Share Alike"));
     $select->setRequired(false);
     $select->setValue(Application_Model_Preference::GetSoundCloudLicense());
     $select->setDecorators(array('ViewHelper'));
     $this->addElement($select);
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:30,代码来源:SoundcloudPreferences.php

示例3: init

 public function init()
 {
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast.phtml'))));
     $relativeDates = array();
     $relativeDates[""] = "";
     for ($i = 0; $i <= 30; $i++) {
         $relativeDates["{$i} days"] = "+{$i} " . _("days");
     }
     for ($i = 1; $i <= 10; $i++) {
         $select = new Zend_Form_Element_Select("add_show_rebroadcast_date_{$i}");
         $select->setAttrib('class', 'input_select');
         $select->setMultiOptions($relativeDates);
         $select->setRequired(false);
         $select->setDecorators(array('ViewHelper'));
         $this->addElement($select);
         $text = new Zend_Form_Element_Text("add_show_rebroadcast_time_{$i}");
         $text->setAttrib('class', 'input_text');
         $text->addFilter('StringTrim');
         $text->addValidator('date', false, array('HH:mm'));
         $text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered')));
         $text->setRequired(false);
         $text->setDecorators(array('ViewHelper'));
         $this->addElement($text);
     }
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:25,代码来源:AddShowRebroadcastDates.php

示例4: __construct

 public function __construct($options = null)
 {
     parent::__construct();
     $this->setName('custom_layout_settings_form');
     $this->addElementPrefixPath('Oibs_Form_Decorator', 'Oibs/Form/Decorator/', 'decorator');
     //echo '<div class="clear"></div>';
     $clear = new Oibs_Form_Element_Note('clear');
     $clear->setValue('<div class="clear"></div>');
     // Font
     $customfont = new Zend_Form_Element_Select('customfont');
     $customfont->setLabel('Custom Font')->setAttrib('id', 'customfont')->addMultiOptions(array('Arial', 'Castellar', 'Times New Roman', 'Microsoft Sans Serif', 'Harrington'));
     // Font size
     $customfontsize = new Zend_Form_Element_Select('customfontsize');
     $customfontsize->setLabel('Font Size')->setAttrib('id', 'customfontsize')->addMultiOptions(array('8', '10', '12', '14', '16'));
     $customsizeclear = new Oibs_Form_Element_Note('customsizeclear');
     $customsizeclear->setValue('<div class="clear"></div>');
     // Font color
     $customfontcolor = $openid = new Zend_Form_Element_Text('customfontcolor');
     $customfontcolor->setLabel('Font Color')->setAttrib('id', 'customfontcolor')->setValue('#000000');
     // Add elements to form
     $this->addElements(array($customfont, $clear, $customfontsize, $customfontcolor));
     // Add decorators
     $customfont->setDecorators(array('InputDecorator'));
     $customfontsize->setDecorators(array('InputDecorator'));
     $customfontcolor->setDecorators(array('ColorPickerDecorator'));
     $this->setDecorators(array('FormElements', 'Form'));
 }
开发者ID:jaakkop,项目名称:site,代码行数:27,代码来源:AccountCustomLayoutSettings.php

示例5: init

 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);
 }
开发者ID:nidzix,项目名称:Airtime,代码行数:34,代码来源:GeneralPreferences.php

示例6: init

 public function init()
 {
     $CC_CONFIG = Config::getConfig();
     // Set the method for the display form to POST
     $this->setMethod('post');
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/login.phtml'))));
     // Add username element
     $this->addElement('text', 'username', array('label' => _('Username:'), 'class' => 'input_text', 'required' => true, 'value' => isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1 ? 'admin' : '', 'filters' => array('StringTrim'), 'validators' => array('NotEmpty'), 'decorators' => array('ViewHelper')));
     // Add password element
     $this->addElement('password', 'password', array('label' => _('Password:'), 'class' => 'input_text', 'required' => true, 'value' => isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1 ? 'admin' : '', 'filters' => array('StringTrim'), 'validators' => array('NotEmpty'), 'decorators' => array('ViewHelper')));
     $locale = new Zend_Form_Element_Select("locale");
     $locale->setLabel(_("Language:"));
     $locale->setMultiOptions(Application_Model_Locale::getLocales());
     $locale->setDecorators(array('ViewHelper'));
     $this->addElement($locale);
     $recaptchaNeeded = false;
     if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
         $recaptchaNeeded = true;
     }
     if ($recaptchaNeeded) {
         // recaptcha
         $this->addRecaptcha();
     }
     // Add the submit button
     $this->addElement('submit', 'submit', array('ignore' => true, 'label' => _('Login'), 'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center', 'decorators' => array('ViewHelper')));
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:26,代码来源:Login.php

示例7: init

 /**
  *
  * Edit Group form
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname));
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/EditGroup.phtml'))));
     // get group from database
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $group = $request->getParam('name');
     $Profiles = new Application_Model_Profiles();
     $ProfilesMeta = new Application_Model_ProfilesMeta();
     $profile = $Profiles->getProfile($group, false, true);
     $owners_profile = $Profiles->getProfileByField('id', $profile->owner);
     $username_minchars = Zend_Registry::get('config')->get('username_minchars');
     $username_maxchars = Zend_Registry::get('config')->get('username_maxchars');
     // fields
     $id = new Zend_Form_Element_Hidden('id');
     $id->setValue($profile->id);
     $name = new Zend_Form_Element_Text('name');
     $name->setDecorators(array('ViewHelper', 'Errors'))->setLabel($this->translator->translate('Group Name'))->setValue($profile->name)->setIgnore(true)->setAttrib('readonly', true)->setAttrib('class', 'form-control');
     $screenname = new Zend_Form_Element_Text('screen_name');
     $screenname->setDecorators(array('ViewHelper', 'Errors'))->addFilter('StringTrim')->setValue($profile->screen_name)->addValidator('alnum', false, array('allowWhiteSpace' => true))->addValidator('stringLength', false, array($username_minchars, $username_maxchars))->setErrorMessages(array(sprintf($this->translator->translate('Please choose a valid name between %d and %d characters'), $username_minchars, $username_maxchars)))->setLabel($this->translator->translate('Screen Name'))->setRequired(true)->setAttrib('class', 'form-control');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('COLS', '')->setAttrib('ROWS', '4')->addFilter('StripTags')->setValue($ProfilesMeta->getMetaValue('description', $profile->id))->setLabel($this->translator->translate('About this group'))->setAttrib('class', 'form-control');
     $profile_privacy = new Zend_Form_Element_Select('profile_privacy');
     $profile_privacy->setDecorators(array('ViewHelper', 'Errors'))->setMultiOptions(Zend_Registry::get('group_privacy_array'))->setErrorMessages(array($this->translator->translate('Select group visibility')))->setLabel($this->translator->translate('Select group visibility'))->setRequired(true)->setValue($profile->profile_privacy)->setAttrib('class', 'form-control');
     $is_hidden = new Zend_Form_Element_Checkbox('is_hidden');
     $is_hidden->setDecorators(array('ViewHelper', 'Errors'))->setValue(isset($profile->is_hidden) && $profile->is_hidden == 1 ? 1 : 0)->setLabel($this->translator->translate('Remove?'))->setCheckedValue("1")->setUncheckedValue("0");
     $submit = new Zend_Form_Element_Submit('formsubmit');
     $submit->setDecorators(array('ViewHelper'))->setLabel($this->translator->translate('Save'))->setAttrib('class', 'submit btn btn-default');
     $this->addElements(array($id, $name, $screenname, $profile_privacy, $description, $is_hidden, $submit));
     $this->postInit();
 }
开发者ID:georgepaul,项目名称:socialstrap,代码行数:38,代码来源:EditGroup.php

示例8: init

 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();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:35,代码来源:Agendar.php

示例9: init

 public function init()
 {
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/preferences_soundcloud.phtml'))));
     //enable soundcloud uploads
     $this->addElement('checkbox', 'UseSoundCloud', array('label' => _('Automatically Upload Recorded Shows'), 'required' => false, 'value' => Application_Model_Preference::GetAutoUploadRecordedShowToSoundcloud(), 'decorators' => array('ViewHelper')));
     //enable soundcloud uploads option
     $this->addElement('checkbox', 'UploadToSoundcloudOption', array('label' => _('Enable SoundCloud Upload'), 'required' => false, 'value' => Application_Model_Preference::GetUploadToSoundcloudOption(), 'decorators' => array('ViewHelper')));
     //enable downloadable for soundcloud
     $this->addElement('checkbox', 'SoundCloudDownloadbleOption', array('label' => _('Automatically Mark Files "Downloadable" on SoundCloud'), 'required' => false, 'value' => Application_Model_Preference::GetSoundCloudDownloadbleOption(), 'decorators' => array('ViewHelper')));
     //SoundCloud Username
     $this->addElement('text', 'SoundCloudUser', array('class' => 'input_text', 'label' => _('SoundCloud Email'), 'filters' => array('StringTrim'), 'autocomplete' => 'off', 'value' => Application_Model_Preference::GetSoundCloudUser(), 'decorators' => array('ViewHelper'), 'allowEmpty' => false, 'validators' => array(new ConditionalNotEmpty(array('UploadToSoundcloudOption' => '1')))));
     //SoundCloud Password
     $this->addElement('password', 'SoundCloudPassword', array('class' => 'input_text', 'label' => _('SoundCloud Password'), 'filters' => array('StringTrim'), 'autocomplete' => 'off', 'value' => Application_Model_Preference::GetSoundCloudPassword(), 'decorators' => array('ViewHelper'), 'allowEmpty' => false, 'validators' => array(new ConditionalNotEmpty(array('UploadToSoundcloudOption' => '1'))), 'renderPassword' => true));
     // Add the description element
     $this->addElement('textarea', 'SoundCloudTags', array('label' => _('SoundCloud Tags: (separate tags with spaces)'), 'required' => false, 'class' => 'input_text_area', 'value' => Application_Model_Preference::GetSoundCloudTags(), 'decorators' => array('ViewHelper')));
     //SoundCloud default genre
     $this->addElement('text', 'SoundCloudGenre', array('class' => 'input_text', 'label' => _('Default Genre:'), 'required' => false, 'filters' => array('StringTrim'), 'value' => Application_Model_Preference::GetSoundCloudGenre(), 'decorators' => array('ViewHelper')));
     $select = new Zend_Form_Element_Select('SoundCloudTrackType');
     $select->setLabel(_('Default Track Type:'));
     $select->setAttrib('class', 'input_select');
     $select->setMultiOptions(array("" => "", "original" => _("Original"), "remix" => _("Remix"), "live" => _("Live"), "recording" => _("Recording"), "spoken" => _("Spoken"), "podcast" => _("Podcast"), "demo" => _("Demo"), "in progress" => _("Work in progress"), "stem" => _("Stem"), "loop" => _("Loop"), "sound effect" => _("Sound Effect"), "sample" => _("One Shot Sample"), "other" => _("Other")));
     $select->setRequired(false);
     $select->setValue(Application_Model_Preference::GetSoundCloudTrackType());
     $select->setDecorators(array('ViewHelper'));
     $this->addElement($select);
     $select = new Zend_Form_Element_Select('SoundCloudLicense');
     $select->setLabel(_('Default License:'));
     $select->setAttrib('class', 'input_select');
     $select->setMultiOptions(array("" => "", "no-rights-reserved" => _("The work is in the public domain"), "all-rights-reserved" => _("All rights are reserved"), "cc-by" => _("Creative Commons Attribution"), "cc-by-nc" => _("Creative Commons Attribution Noncommercial"), "cc-by-nd" => _("Creative Commons Attribution No Derivative Works"), "cc-by-sa" => _("Creative Commons Attribution Share Alike"), "cc-by-nc-nd" => _("Creative Commons Attribution Noncommercial Non Derivate Works"), "cc-by-nc-sa" => _("Creative Commons Attribution Noncommercial Share Alike")));
     $select->setRequired(false);
     $select->setValue(Application_Model_Preference::GetSoundCloudLicense());
     $select->setDecorators(array('ViewHelper'));
     $this->addElement($select);
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:34,代码来源:SoundcloudPreferences.php

示例10: init

 public function init()
 {
     $this->setName('transfer_source');
     $this->setAttrib('class', 'form-inline');
     $host1 = new Zend_Form_Element_Text('host1');
     $host1->setAttrib('class', 'form-control')->setLabel('host1')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator('Hostname');
     $edit = new Zend_Form_Element_Hidden('edit');
     //$edit->setLabel('Edition Mode');
     //$edit->clearDecorators();
     $host1->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $user1 = new Zend_Form_Element_Text('user1');
     $user1->setLabel('user1')->setAttrib('class', 'form-control')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator('EmailAddress');
     $user1->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $password1 = new Zend_Form_Element_Text('password1');
     $password1->setLabel('pass1')->setAttrib('class', 'form-control')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     $password1->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
     $action = new Zend_Form_Element_Select('action');
     $action->setOptions(array('1' => 'source', '2' => 'target'));
     $action->setAttrib('class', 'form-control');
     $action->options = array('1' => 'source', '2' => 'target');
     $action->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-2'))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Submit');
     $submit->setAttrib('class', 'btn btn-default');
     $submit->setAttrib('value', 'transfer_source');
     $submit->setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'div', 'colspan' => 2, 'align' => 'center')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElements(array($edit, $host1, $user1, $password1, $action, $submit));
     $this->setDecorators(array('FormElements', 'Form'));
 }
开发者ID:graniasty,项目名称:imap_zend,代码行数:29,代码来源:AddToTransfer_u.php

示例11: init

 /**
  *
  * Themes & styles
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname));
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/SettingsStyles.phtml'))));
     // load settings
     $AppOptions = new Application_Model_AppOptions();
     $all_meta = $AppOptions->getAllOptions();
     // fields
     $themes_array = array('/bootstrap/css/bootstrap.min.css' => 'Bootstrap');
     $css_theme = new Zend_Form_Element_Select('css_theme');
     $css_theme->setDecorators(array('ViewHelper', 'Errors'))->setMultiOptions($themes_array)->setErrorMessages(array($this->translator->translate('Please select')))->setLabel($this->translator->translate('Choose css theme'))->setRequired(true)->setValue(isset($all_meta['css_theme']) ? $all_meta['css_theme'] : 'bootstrap')->setAttrib('class', 'form-control');
     $wide_layout = new Zend_Form_Element_Checkbox('wide_layout');
     $wide_layout->setDecorators(array('ViewHelper', 'Errors'))->setValue(isset($all_meta['wide_layout']) && $all_meta['wide_layout'] == 1 ? 1 : 0)->setLabel($this->translator->translate('Extra-wide layout on large screens'))->setCheckedValue("1")->setUncheckedValue("0");
     $cover_ysize = new Zend_Form_Element_Text('cover_ysize');
     $cover_ysize->setDecorators(array('ViewHelper', 'Errors'))->setLabel($this->translator->translate('Cover image height'))->setValidators(array('digits'))->setRequired(true)->setValue(isset($all_meta['cover_ysize']) ? $all_meta['cover_ysize'] : '220')->setAttrib('class', 'form-control');
     $user_background = new Zend_Form_Element_Checkbox('user_background');
     $user_background->setDecorators(array('ViewHelper', 'Errors'))->setValue(isset($all_meta['user_background']) && $all_meta['user_background'] == 1 ? 1 : 0)->setLabel($this->translator->translate('Users can have custom background image'))->setCheckedValue("1")->setUncheckedValue("0");
     $subscriber_background = new Zend_Form_Element_Checkbox('subscriber_background');
     $subscriber_background->setDecorators(array('ViewHelper', 'Errors'))->setValue(isset($all_meta['subscriber_background']) && $all_meta['subscriber_background'] == 1 ? 1 : 0)->setLabel($this->translator->translate('Subscribers can have custom background image'))->setCheckedValue("1")->setUncheckedValue("0");
     $custom_css = new Zend_Form_Element_Textarea('css_custom');
     $custom_css->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('COLS', '')->setAttrib('ROWS', '15')->setValue(isset($all_meta['css_custom']) ? $all_meta['css_custom'] : '')->setLabel($this->translator->translate('Custom css'))->setAttrib('class', 'form-control');
     $submit = new Zend_Form_Element_Submit('submitbtn');
     $submit->setDecorators(array('ViewHelper'))->setLabel($this->translator->translate('Update'))->setAttrib('class', 'submit btn btn-default');
     $this->addElements(array($css_theme, $wide_layout, $cover_ysize, $user_background, $subscriber_background, $custom_css, $submit));
     $this->postInit();
 }
开发者ID:georgepaul,项目名称:songslikesocial,代码行数:33,代码来源:SettingsStyle.php

示例12: init

 public function init()
 {
     // projeto_id
     $projeto_id = new Zend_Form_Element_Select("projeto_id");
     $projeto_id->setLabel("Projeto: ");
     $projeto_id->setAttribs(array('class' => 'form-control'));
     $projeto_id->setMultiOptions($this->getProjetos());
     // cliente_id
     $cliente_id = new Zend_Form_Element_Select("cliente_id");
     $cliente_id->setLabel("Cliente: ");
     $cliente_id->setAttribs(array('class' => 'form-control'));
     $cliente_id->setRequired(false);
     $cliente_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente_id->setMultiOptions($this->getClientes());
     // faturamento_tipo
     $faturamento_tipo = new Zend_Form_Element_Select("faturamento_tipo");
     $faturamento_tipo->setLabel("Tipo: ");
     $faturamento_tipo->setAttribs(array('class' => 'form-control'));
     $faturamento_tipo->setRequired(false);
     $faturamento_tipo->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $faturamento_tipo->setMultiOptions(array(1 => 'Boleto', 2 => 'Transferência'));
     // faturamento_valor
     $faturamento_valor = new Zend_Form_Element_Text("faturamento_valor");
     $faturamento_valor->setLabel("Valor: ");
     $faturamento_valor->setAttribs(array('class' => 'form-control'));
     //$faturamento_valor->setRequired();
     $faturamento_valor->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_descricao
     $faturamento_descricao = new Zend_Form_Element_Text("faturamento_descricao");
     $faturamento_descricao->setLabel("Descrição: ");
     $faturamento_descricao->setAttribs(array('class' => 'form-control'));
     $faturamento_descricao->setRequired();
     $faturamento_descricao->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_nosso_numero
     $faturamento_nosso_numero = new Zend_Form_Element_Text("faturamento_nosso_numero");
     $faturamento_nosso_numero->setLabel("Nosso Nº: ");
     $faturamento_nosso_numero->setAttribs(array('class' => 'form-control'));
     //$faturamento_nosso_numero->setRequired();
     $faturamento_nosso_numero->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_vencimento
     $faturamento_vencimento = new Zend_Form_Element_Text("faturamento_vencimento");
     $faturamento_vencimento->setLabel("Vencimento: ");
     $faturamento_vencimento->setAttribs(array('class' => 'form-control'));
     $faturamento_vencimento->setRequired();
     $faturamento_vencimento->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_nota_fiscal
     $faturamento_nota_fiscal = new Zend_Form_Element_File("faturamento_nota_fiscal");
     $faturamento_nota_fiscal->setLabel("Nota Fiscal:");
     $faturamento_nota_fiscal->addDecorators(App_Forms_Decorators::$ElementDecoratorFile);
     $faturamento_nota_fiscal->setAttribs(array('class' => 'filestyle', 'data-buttonText' => 'Selecione a Nota Fiscal', 'data-iconName' => 'fa fa-file'));
     //$faturamento_nota_fiscal->setRequired();
     $faturamento_nota_fiscal->setDestination(Zend_Registry::get('config')->notafiscal->filepath);
     $faturamento_nota_fiscal->addValidators(array(array('Extension', false, 'pdf')));
     $this->addElements(array($projeto_id, $cliente_id, $faturamento_tipo, $faturamento_vencimento, $faturamento_valor, $faturamento_nosso_numero, $faturamento_descricao, $faturamento_nota_fiscal));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:56,代码来源:FaturamentoCadastro.php

示例13: populateShowInstances

 public function populateShowInstances($possibleInstances, $default)
 {
     $possibleInstances["0"] = _("No Show");
     $instance = new Zend_Form_Element_Select("his_instance_select");
     //$instance->setLabel(_("Choose Show Instance"));
     $instance->setMultiOptions($possibleInstances);
     $instance->setValue($default);
     $instance->setDecorators(array('ViewHelper'));
     $this->addElement($instance);
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:10,代码来源:EditHistoryItem.php

示例14: init

 public function init()
 {
     // proposta_numero
     $proposta_numero = new Zend_Form_Element_Text("proposta_numero");
     $proposta_numero->setLabel("Número: ");
     $proposta_numero->setAttribs(array('class' => 'form-control'));
     // proposta_tipo_id
     $proposta_tipo_id = new Zend_Form_Element_Select("proposta_tipo_id");
     $proposta_tipo_id->setLabel("Tipo Proposta: ");
     $proposta_tipo_id->setAttribs(array('class' => 'form-control'));
     $proposta_tipo_id->setRequired();
     $proposta_tipo_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $proposta_tipo_id->setMultiOptions($this->getPropostaTipo());
     // cliente_id
     $cliente_id = new Zend_Form_Element_Select("cliente_id");
     $cliente_id->setLabel("Cliente: ");
     $cliente_id->setAttribs(array('class' => 'form-control'));
     $cliente_id->setRequired();
     $cliente_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente_id->setMultiOptions($this->getClientes());
     // tipo_servico_id
     $tipo_servico_id = new Zend_Form_Element_Select("tipo_servico_id");
     $tipo_servico_id->setLabel("Tipo de Serviço: ");
     $tipo_servico_id->setAttribs(array('class' => 'form-control'));
     $tipo_servico_id->setRequired();
     $tipo_servico_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $tipo_servico_id->setMultiOptions($this->getTipoServicos());
     // proposta_horas
     $proposta_horas = new Zend_Form_Element_Text("proposta_horas");
     $proposta_horas->setLabel("Horas: ");
     $proposta_horas->setAttribs(array('class' => 'form-control'));
     // proposta_valor
     $proposta_valor = new Zend_Form_Element_Text("proposta_valor");
     $proposta_valor->setLabel("Valor: ");
     $proposta_valor->setAttribs(array('class' => 'form-control'));
     // proposta_data
     $proposta_data = new Zend_Form_Element_Text("proposta_data");
     $proposta_data->setLabel("Data: ");
     $proposta_data->setAttribs(array('class' => 'form-control'));
     // proposta_vencimento
     $proposta_vencimento = new Zend_Form_Element_Text("proposta_vencimento");
     $proposta_vencimento->setLabel("Vencimento: ");
     $proposta_vencimento->setAttribs(array('class' => 'form-control'));
     // proposta_documento
     $proposta_documento = new Zend_Form_Element_File("proposta_documento");
     $proposta_documento->setLabel("Proposta:");
     $proposta_documento->addDecorators(App_Forms_Decorators::$ElementDecoratorFile);
     $proposta_documento->setAttribs(array('class' => 'filestyle', 'data-buttonText' => 'Selecione o PDF', 'data-iconName' => 'fa fa-file'));
     //$proposta_documento->setRequired();
     $proposta_documento->setDestination(Zend_Registry::get('config')->proposta->filepath);
     $proposta_documento->addValidators(array(array('Extension', false, 'pdf')));
     $this->addElements(array($proposta_numero, $cliente_id, $proposta_tipo_id, $tipo_servico_id, $proposta_horas, $proposta_valor, $proposta_data, $proposta_vencimento, $proposta_documento));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:54,代码来源:PropostaCadastro.php

示例15: init

 public function init()
 {
     // proposta_id
     /*
     $proposta_id = new Zend_Form_Element_Select("proposta_id");
     $proposta_id->setLabel("Proposta: ");
     $proposta_id->setAttribs(array(
         'class' => 'form-control'
     ));
     $proposta_id->setMultiOptions($this->getPropostas());
     */
     // cliente
     $cliente = new Zend_Form_Element_Select("cliente");
     $cliente->setLabel("Cliente: ");
     $cliente->setAttribs(array('class' => 'form-control'));
     $cliente->setRequired(false);
     $cliente->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente->setMultiOptions($this->getClientes());
     // cliente_id
     $cliente_id = new Zend_Form_Element_Hidden("cliente_id");
     // projeto_nome
     $projeto_nome = new Zend_Form_Element_Text("projeto_nome");
     $projeto_nome->setLabel("Nome: ");
     $projeto_nome->setAttribs(array('class' => 'form-control'));
     $projeto_nome->setRequired();
     $projeto_nome->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // projeto_horas
     /*
     $projeto_horas = new Zend_Form_Element_Text("projeto_horas");
     $projeto_horas->setLabel("Horas: ");
     $projeto_horas->setAttribs(array(
         'class' => 'form-control',
         'readonly' => true
     ));
     $projeto_horas->setRequired();
     $projeto_horas->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     */
     // projeto_valor
     /*
     $projeto_valor = new Zend_Form_Element_Text("projeto_valor");
     $projeto_valor->setLabel("Valor: ");
     $projeto_valor->setAttribs(array(
         'class' => 'form-control',
         'readonly' => true
     ));
     $projeto_valor->setRequired();
     $projeto_valor->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     */
     /**
      * Add Elements
      */
     $this->addElements(array($cliente, $cliente_id, $projeto_nome));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:54,代码来源:ProjetoCadastro.php


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