protected function _initFields()
 {
     parent::_initFields();
     $this->_model = new Kwf_Model_FnF();
     $this->fields->add(new Kwf_Form_Field_TextField('query', 'Query'))->setAutoComplete(false)->setHideLabel(true)->setEmptyText(trlKwfStatic('Search'))->setNamePrefix('');
     // to get "default" parameter "search" which is automatically excluded on user tracking systems
 }
示例#2
0
 protected function _initFields()
 {
     parent::_initFields();
     $userEditForm = $this->fields->add(new $this->_userDataFormName('user'));
     $userEditForm->setIdTemplate('{0}');
     $root = Kwf_Component_Data_Root::getInstance();
     if ($root) {
         $userDirectory = $root->getComponentByClass('Kwc_User_Directory_Component');
     }
     if ($root && isset($userDirectory) && $userDirectory) {
         $detailClass = Kwc_Abstract::getChildComponentClass($userDirectory->componentClass, 'detail');
         $userEditForm->addUserForms($detailClass, array('general'));
         $userEditForm->fields['firstname']->setAllowBlank(true);
         $userEditForm->fields['lastname']->setAllowBlank(true);
     } else {
         $this->fields->add(new Kwc_User_Detail_General_Form('general', null))->setIdTemplate('{0}');
     }
     $config = Zend_Registry::get('config');
     $authedUser = Kwf_Registry::get('userModel')->getAuthedUser();
     if (isset($authedUser->language) && $config->languages) {
         $data = array();
         foreach ($config->languages as $key => $value) {
             $data[$key] = $value;
         }
         $this->fields->add(new Kwf_Form_Field_Select('language', trlKwf('Language')))->setValues($data);
     }
 }
示例#3
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(500);
     $this->add(new Kwf_Form_Field_TextArea('teaser', trlKwf('Teaser')))->setWidth(500)->setHeight(100);
     $this->add(new Kwf_Form_Field_DateField('date', trlKwf('Publication')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_Select('author_id', trlKwf('Author')))->setAllowBlank(false)->setWidth(200)->setValues(Kwf_Model_Abstract::getInstance('Kwc_Articles_Directory_AuthorsModel')->getRows());
     $v = new Zend_Validate_Regex('/^[0-9]{4}\\/[0-9]{2}$/');
     $v->setMessage(trlKwf('Please use this format -> Year / Month'), Zend_Validate_Regex::NOT_MATCH);
     $this->add(new Kwf_Form_Field_TextField('vi_nr', trlKwf('VI-Number')))->setWidth(70)->addValidator($v);
     $this->add(Kwc_Abstract_Form::createComponentFormByDbIdTemplate('article_{0}-previewImage', 'previewImage'));
     $columns = $this->add(new Kwf_Form_Container_Columns('is_top'));
     $col = $columns->add(new Kwf_Form_Container_Column());
     $col->setStyle('margin-left: 0px');
     $col->add(new Kwf_Form_Field_Checkbox('is_top_checked', trlKwf('Hot-topic')));
     $col = $columns->add(new Kwf_Form_Container_Column());
     $col->setLabelWidth(50);
     $col->add(new Kwf_Form_Field_DateField('is_top_expire', trlKwf('Ends at')));
     $this->add(new Kwf_Form_Field_Checkbox('read_required', trlKwf('Required reading')));
     $this->add(new Kwf_Form_Field_Checkbox('only_intern', trlKwf('Only intern')));
     $priority = array();
     for ($i = 1; $i <= 10; $i++) {
         $priority[$i] = $i;
     }
     $this->add(new Kwf_Form_Field_Select('priority', trlKwf('Priority')))->setAllowBlank(false)->setValues($priority)->setWidth(40)->setHelpText(trlKwfStatic('For sorting articles if they have same date'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_Radio('gender', trlKwfStatic('Gender')))->setAllowBlank(false)->setValues(array('female' => trlKwfStatic('Female'), 'male' => trlKwfStatic('Male')))->setCls('kwf-radio-group-transparent');
     $this->add(new Kwf_Form_Field_TextField('title', trlKwfStatic('Title')));
     $this->add(new Kwf_Form_Field_TextField('firstname', trlKwfStatic('Firstname')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('lastname', trlKwfStatic('Lastname')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('email', trlKwfStatic('E-Mail')))->setVtype('email')->setAllowBlank(false);
     $this->_addEmailValidator();
 }
示例#5
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(300);
     $this->add(new Kwf_Form_Field_ShowField('original_title', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('title'));
     $this->add(new Kwf_Form_Field_TextField('place', trlKwf('Place (City)')))->setWidth(300);
     $this->add(new Kwf_Form_Field_ShowField('original_place', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('place'));
     $this->add(new Kwf_Form_Field_TextArea('teaser', trlKwf('Teaser')))->setWidth(300)->setHeight(100);
     $this->add(new Kwf_Form_Field_ShowField('original_teaser', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('teaser'));
 }
示例#6
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(500);
     $this->add(new Kwf_Form_Field_ShowField('original_title', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('title'));
     $this->add(new Kwf_Form_Field_TextArea('teaser', trlKwf('Teaser')))->setWidth(500)->setHeight(100);
     $this->add(new Kwf_Form_Field_ShowField('original_teaser', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('teaser'));
     $this->add(new Kwf_Form_Field_ShowField('original_date', trlKwf('Publication')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('date'))->setTpl('{value:date}');
     $this->add(new Kwf_Form_Field_ShowField('original_author_id', trlKwf('Author')))->setData(new Kwc_Articles_Detail_Trl_Data('author_id'));
     $this->add(new Kwf_Form_Field_ShowField('original_vi_nr', trlKwf('VI-Number')))->setData(new Kwf_Data_Trl_OriginalComponentFromData('vi_nr'));
     $this->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-previewImage'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->setCartEmptyMessage(trlKwfStatic("Can't submit order because the cart is empty."));
     $this->add(new Kwf_Form_Field_Panel('intro_text'))->setHtml('<h1>' . trlKwfStatic('Please enter your address') . '</h1>')->setHideFieldInBackend(true);
     $this->add(new Kwf_Form_Field_Radio('sex', trlcKwfStatic('sex', 'Title')))->setValues(array('male' => trlKwfStatic('Mr.'), 'female' => trlKwfStatic('Ms.')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('title', trlKwfStatic('Title')));
     $this->add(new Kwf_Form_Field_TextField('firstname', trlKwfStatic('First name')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('lastname', trlKwfStatic('Last name')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('street', trlKwfStatic('Street')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('zip', trlKwfStatic('ZIP')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('city', trlKwfStatic('City')))->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_SelectCountry('country', trlKwfStatic('Country')))->setDefaultValue('AT')->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('email', trlKwfStatic('E-Mail')))->setVtype('email')->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextField('phone', trlKwfStatic('Phone')));
     $this->add(new Kwf_Form_Field_Panel('payment_text'))->setHtml('<p class="formText">' . trlKwfStatic('What type of payment do you wish?') . '</p>')->setHideFieldWhenOnePayment(true)->setHideFieldInBackend(true);
     $this->add(new Kwf_Form_Field_Radio('payment', trlKwfStatic('Payment')))->setHideFieldInBackend(true)->setHideFieldWhenOnePayment(true)->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_TextArea('comment', trlKwfStatic('Other comments, questions or suggestions')));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextArea('text', trlKwf('Text')))->setWidth(420)->setHeight(200);
 }
示例#9
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(300);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_TextField('voucher_code', trlKwfStatic('Voucher Code')))->addValidator(new Kwc_Shop_Cart_Plugins_Voucher_VoucherValidator())->setAllowBlank(false);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->_model = new Kwf_Model_FnF();
     $this->add(new Kwf_Form_Field_TextField('query', 'Query'));
 }