protected function _initFields() { parent::_initFields(); $domains = self::getDomains(); if ($domains && count($domains) > 1) { $this->_form->add(new Kwf_Form_Field_Select('domain_component_id', trlKwf('Domain')))->setWidth(150)->setValues($domains)->setAllowBlank(false); } $fs = $this->_form->add(new Kwf_Form_Container_FieldSet(trlKwf('Source'))); $fs->add(new Kwf_Form_Field_Select('type', trlKwf('Type')))->setWidth(150)->setValues(array('path' => trlKwf('Path'), 'domain' => trlKwf('Domain'), 'domainPath' => trlKwf('Domain and Path')))->setAllowBlank(false); $fs->add(new Kwf_Form_Field_TextField('source', trlKwf('Source')))->setWidth(500)->setAllowBlank(false); $fs = $this->_form->add(new Kwf_Form_Container_FieldSet(trlKwf('Target'))); $cards = $fs->add(new Kwf_Form_Container_Cards('target_type', trlKwf('Type'))); if (Kwf_Registry::get('acl') instanceof Kwf_Acl_Component) { $card = $cards->add(); $card->setName('intern'); $card->fields->setFormName('intern'); $card->setTitle(trlKwf('Internal Page')); $card->add(new Kwf_Form_Field_PageSelect('target', trlKwf('Target')))->setControllerUrl('/kwf/redirects/pages')->setAllowBlank(false); $card = $cards->add(); $card->setName('downloadTag'); $card->fields->setFormName('downloadTag'); $card->setTitle(trlKwf('Internal Download')); $card->add(new Kwf_Form_Field_TextField('target', trlKwf('Component-Id')))->setAllowBlank(false); } $card = $cards->add(); $card->setName('extern'); $card->fields->setFormName('extern'); $card->setTitle(trlKwf('External Url')); $card->add(new Kwf_Form_Field_UrlField('target', trlKwf('Target')))->setAllowBlank(false)->setWidth(500); $this->_form->add(new Kwf_Form_Field_TextField('comment', trlKwf('Comment')))->setWidth(500); }
protected function _initFields() { parent::_initFields(); $authedUser = Kwf_Registry::get('userModel')->getAuthedUser(); $hasPassword = false; $allowPassword = true; foreach (Kwf_Registry::get('userModel')->getAuthMethods() as $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Password) { $hasPassword = true; } if ($auth instanceof Kwf_User_Auth_Interface_Redirect) { if (!$auth->allowPasswordForUser($authedUser) && $allowPassword) { $allowPassword = false; } } } if ($hasPassword && $allowPassword) { $fs = $this->_form->add(new Kwf_Form_Container_FieldSet(trlKwf('Change password'))); $fs->setLabelWidth(130); $passwordField = $fs->add(new Kwf_Form_Field_Password('password1', trlKwf('Change password'))); $validatorClass = Kwf_Registry::get('config')->user->passwordValidator; if ($validatorClass) { $passwordField->addValidator(new $validatorClass()); } $fs->add(new Kwf_Form_Field_Password('password2', trlKwf('Repeat password'))); } }
protected function _initFields() { parent::_initFields(); $this->_form->add(new Kwf_Form_Field_ShowField('code', trlKwf('Code'))); $this->_form->add(new Kwf_Form_Field_NumberField('amount', trlcKwf('Amount of Money', 'Amount')))->setWidth(50)->setComment('€'); $this->_form->add(new Kwf_Form_Field_DateField('date', trlKwf('Date')))->setDefaultValue(date('Y-m-d')); $this->_form->add(new Kwf_Form_Field_TextArea('comment', trlKwf('Comment')))->setWidth(250)->setHeight(70); }
protected function _initFields() { parent::_initFields(); $this->_form->setId(1); $this->_form->add(new Kwf_Form_Field_File('WelcomeImage', trlKwf('Welcome-Image'))); $this->_form->add(new Kwf_Form_Field_File('LoginImage', trlKwf('Login-Image'))); $this->_form->add(new Kwf_Form_Field_HtmlEditor('content', 'Content'))->setEnableLinks(false)->setEnableFont(false); }
protected function _initFields() { parent::_initFields(); $this->_form->setId(1); $this->_form->setLabelWidth(30); $this->_form->add(new Kwf_Form_Field_Static(trlKwf('Affected component / part (e.g.: References)'))); $this->_form->add(new Kwf_Form_Field_TextField('clear_cache_affected'))->setWidth(500)->setLabelSeparator('')->setAllowBlank(false); $this->_form->add(new Kwf_Form_Field_Static(trlKwf('Why did you have to clear the cache? (steps to reproduce / description)'))); $this->_form->add(new Kwf_Form_Field_TextArea('clear_cache_comment'))->setWidth(500)->setHeight(250)->setLabelSeparator('')->setAllowBlank(false); }
protected function _initFields() { parent::_initFields(); $fs = $this->_form->add(new Kwf_Form_Container_FieldSet(trlKwf('Contact person')))->setName('contactpersonfieldset'); $fs->add(new Kwf_Form_Field_Select('gender', trlKwf('Gender')))->setWidth(250)->setValues(array('male' => trlKwf('Mr.'), 'female' => trlKwf('Ms.'))); $fs->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextField('firstname', trlKwf('Firstname')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextField('lastname', trlKwf('Lastname')))->setWidth(250); $fs->add(new Kwf_Form_Field_DateField('birthdate', trlKwf('Date of birth')))->setAllowBlank(true); $fs->add(new Kwf_Form_Field_TextField('phone', trlKwf('Phone')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextField('mobile', trlKwf('Mobile')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextField('email', trlKwf('E-Mail')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextField('capacity', trlcKwf('career', 'Capacity')))->setWidth(250); $fs->add(new Kwf_Form_Field_TextArea('annotation', trlKwf('Annotation')))->setWidth(250)->setHeight(70); }
protected function _initFields() { parent::_initFields(); $fs = $this->_form->prepend(new Kwf_Form_Container_FieldSet(trlKwf('Advice'))); $fs->setLabelWidth(100); $fs->add(new Kwf_Form_Field_Panel())->setHtml(trlKwf('After following actions emails are sent automatically to the respective user:'******'<br />' . trlKwf('Create, Delete and E-Mail change')); $fs->add(new Kwf_Form_Field_Checkbox('avoid_mailsend', trlKwf('E-Mails')))->setSave(false)->setBoxLabel(trlKwf("Don't send any E-Mail when saving.")); if ($roleField = $this->_getRoleField()) { $this->_getPermissionFieldset()->add($roleField); } $fs = $this->_form->add(new Kwf_Form_Container_FieldSet(trlKwf('Statistics'))); $fs->setLabelWidth(100); $fs->add(new Kwf_Form_Field_ShowField('logins', trlKwf('Logins'))); $fs->add(new Kwf_Form_Field_ShowField('last_login', trlKwf('Last login')))->setTpl('{value:localizedDatetime}'); }
protected function _initFields() { parent::_initFields(); $form = $this->_form; $form->setLabelWidth(150); $cards = $form->add(new Kwf_Form_Container_Cards()); $cards->setCombobox(new Kwf_Form_Field_Radio('status', trlKwf('Starting Time'))); $cards->getCombobox()->setAllowBlank(false)->setWidth(150); $card = $cards->add(); $card->setTitle(trlKwf('Instantly')); $card->setName('start'); $card = $cards->add(); $card->setTitle(trlKwf('Later')); $card->setName('startLater'); $card->fields->add(new Kwf_Form_Field_DateTimeField('start_date', trlKwf('Date'))); $form->add(new Kwf_Form_Field_Select('mails_per_minute', trlKwf('Sending speed')))->setValues(array('slow' => trlKwf('Slow'), 'normal' => trlKwf('Normal'), 'fast' => trlKwf('Fast'), 'unlimited' => trlKwf('Unlimited'))); }
protected function _initFields() { parent::_initFields(); $cards = $this->_form->add(new Kwf_Form_Container_Cards('add_component_class', trlKwf('Type'))); foreach (Kwc_Abstract::getComponentClasses() as $c) { if (is_instance_of($c, 'Kwc_Shop_AddToCartAbstract_Component')) { $card = $cards->add(); $card->setName($c); $card->setTitle(Kwc_Abstract::getSetting($c, 'productTypeText')); $formClass = Kwc_Admin::getComponentClass($c, 'FrontendForm'); $form = new $formClass($c, $c); $form->setModel(Kwf_Model_Abstract::getInstance('Kwc_Shop_Cart_OrderProducts')); $form->setIdTemplate('{0}'); Kwc_Shop_AddToCartAbstract_OrderProductData::getInstance($c)->alterBackendOrderForm($form); $card->add($form); } } $cards->setAllowBlank(false); }
protected function _initFields() { parent::_initFields(); $form = $this->_form; $form->add(new Kwf_Form_Field_ShowField('date', trlKwf('Time')))->setTpl('{value:localizedDatetime}'); $form->add(new Kwf_Form_Field_ShowField('type', trlKwf('Type'))); $form->add(new Kwf_Form_Field_ShowField('exception', 'Exception')); $form->add(new Kwf_Form_Field_ShowField('message', trlKwf('Message'))); $form->add(new Kwf_Form_Field_ShowField('thrown', 'Thrown')); $form->add(new Kwf_Form_Field_ShowField('exception_detail', trlKwf('Detail')))->setTpl('<pre>{value:nl2Br}</pre>'); $form->add(new Kwf_Form_Field_ShowField('request_uri', 'Uri'))->setTpl('{value:clickableLink}'); $form->add(new Kwf_Form_Field_ShowField('useragent', 'User Agent')); $form->add(new Kwf_Form_Field_ShowField('http_referer', 'Referer'))->setTpl('{value:clickableLink}'); $form->add(new Kwf_Form_Field_ShowField('user', trlKwf('User'))); $form->add(new Kwf_Form_Field_ShowField('get', '$_GET'))->setTpl('<pre>{value:nl2Br}</pre>'); $form->add(new Kwf_Form_Field_ShowField('post', '$_POST'))->setTpl('<pre>{value:nl2Br}</pre>'); $form->add(new Kwf_Form_Field_ShowField('files', '$_FILES'))->setTpl('<pre>{value:nl2Br}</pre>'); $form->add(new Kwf_Form_Field_ShowField('session', '$_SESSION'))->setTpl('<pre>{value:nl2Br}</pre>'); $form->add(new Kwf_Form_Field_ShowField('server', '$_SERVER'))->setTpl('<pre>{value:nl2Br}</pre>'); }
protected function _initFields() { parent::_initFields(); $this->_form = new Kwc_Root_Category_Trl_GeneratorForm(null, $this->_getParam('class')); $this->_form->setId($this->_getParam('id')); }