protected function _init() { parent::_init(); if (!$this->getModel()) { $this->setModel(Kwf_Registry::get('userModel')->getEditModel()); } }
protected function _init() { parent::_init(); $this->_getParentField()->add(new Kwf_Form_Field_ShowField('firstname_interface', trlKwfStatic('Firstname')))->setData(new Kwc_Newsletter_Unsubscribe_Form_RecipientData('getMailFirstname')); $this->_getParentField()->add(new Kwf_Form_Field_ShowField('lastname_interface', trlKwfStatic('Lastname')))->setData(new Kwc_Newsletter_Unsubscribe_Form_RecipientData('getMailLastname')); $this->_getParentField()->add(new Kwf_Form_Field_ShowField('email_interface', trlKwfStatic('E-Mail')))->setData(new Kwc_Newsletter_Unsubscribe_Form_RecipientData('getMailEmail')); }
protected function _init() { parent::_init(); $this->_model = new Kwf_Model_FnF(); $this->add(new Kwf_Form_Field_TextField('email', trlKwfStatic('E-Mail')))->setVtype('email')->setAutofocus(true)->setAllowBlank(false); $this->add(new Kwf_Form_Field_Password('password', trlKwfStatic('Password')))->setAllowBlank(false); $this->add(new Kwf_Form_Field_Checkbox('auto_login', trlKwfStatic('Auto Login'))); }
protected function _init() { parent::_init(); $passwordField = $this->add(new Kwf_Form_Field_DoublePassword('password', trlKwfStatic('Password'))); $validatorClass = Kwf_Registry::get('config')->user->passwordValidator; if ($validatorClass) { $passwordField->getChildren()->getByName('password')->addValidator(new $validatorClass()); } }
protected function _init() { $this->setModel(new Kwf_Model_Mail(array('tpl' => 'Kwc_FormStatic_Form_Component'))); $this->add(new Kwf_Form_Field_TextField('fullname', 'Name'))->setAllowBlank(false); $this->add(new Kwf_Form_Field_TextField('email', 'E-Mail'))->setVtype('email')->setAllowBlank(false); $this->add(new Kwf_Form_Field_TextField('phone', 'Telefon'))->setWidth(255); $this->add(new Kwf_Form_Field_TextArea('content', 'Nachricht'))->setAllowBlank(false); parent::_init(); }
protected function _init() { parent::_init(); $this->add(new Kwf_Form_Field_Password('old_password', trlKwfStatic('Current Password')))->addValidator(new Kwf_Validate_UserPassword())->setAllowBlank(false); $newPasswordField = $this->add(new Kwf_Form_Field_DoublePassword('new_password', trlKwfStatic('New Password'))); $validatorClass = Kwf_Registry::get('config')->user->passwordValidator; if ($validatorClass) { $newPasswordField->getChildren()->getByName('new_password')->addValidator(new $validatorClass()); } $this->add($newPasswordField); }
protected function _init() { parent::_init(); $this->add(new Kwf_Form_Field_NumberField('pos', trlKwf('Position')))->setAllowDecimals(false)->setAllowNegative(false)->setWidth(50); $this->add(new Kwf_Form_Field_TextField('name', trlKwf('Name')))->setAllowBlank(false); $this->add(new Kwf_Form_Field_ColorField('color', trlKwf('Color')))->setDefaultValue('000000'); $this->add(new Kwf_Form_Field_Select('font_weight', trlKwf('Font Weight')))->setShowNoSelection(true)->setValues(array('normal' => trlKwf('Normal'), 'bold' => trlKwf('Bold'), 'bolder' => trlKwf('Bolder'), 'lighter' => trlKwf('Lighter'))); $this->add(new Kwf_Form_Field_Select('font_family', trlKwf('Font Family')))->setShowNoSelection(true)->setValues(array('Arial, Verdana, Helvetica, sans-serif' => 'Arial', '"Courier New", Courier, monospace' => 'Courier New', 'Times, "Times New Roman", Georgia, serif' => 'Times New Roman', 'Verdana, Arial, Helvetica, sans-serif' => 'Verdana')); $this->add(new Kwf_Form_Field_NumberField('font_size', trlKwf('Font size')))->setAllowNegative(false)->setAllowDecimals(false)->setWidth(50); $this->add(new Kwf_Form_Field_TextArea('additional', trlKwf('Additional Styles')))->setHeight(50)->setWidth(200); }
protected function _init() { $this->setModel(new Kwf_Model_FnF()); $this->add(new Kwf_Form_Field_TextField('firstname', trlStatic('Firstname'))); $this->add(new Kwf_Form_Field_TextField('lastname', trlStatic('Lastname'))); $this->add(new Kwf_Form_Field_TextField('company', trlStatic('Company'))); $this->add(new Kwf_Form_Field_TextField('firstname2', trlKwfStatic('Firstname'))); $this->add(new Kwf_Form_Field_TextField('lastname2', trlKwfStatic('Lastname'))); $this->add(new Kwf_Form_Field_TextField('company2', trlKwfStatic('Company'))); $this->add(new Kwf_Form_Field_TextField('company3', trlKwfStatic('Company') . '-' . trlKwfStatic('Lastname'))); parent::_init(); }
protected function _init() { parent::_init(); $componentClasses = array(); $componentNames = array(); $component = $this->_componentOrParent; while (empty($componentClasses) && $component) { foreach (Kwc_Abstract::getSetting($component->componentClass, 'generators') as $key => $generator) { if (is_instance_of($generator['class'], 'Kwc_Root_Category_Generator')) { foreach ($generator['component'] as $k => $class) { $name = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($class, 'componentName')); if ($name) { $name = str_replace('.', ' ', $name); $componentNames[$k] = $name; $componentClasses[$k] = $class; } } } } $component = $component->parent; } $fields = $this->fields; $fields->add(new Kwf_Form_Field_TextField('name', trlKwf('Name of Page')))->setAllowBlank(false); $fs = $fields->add(new Kwf_Form_Container_FieldSet('name', trlKwf('Name of Page')))->setTitle(trlKwf('Custom Filename'))->setCheckboxName('custom_filename')->setCheckboxToggle(true); $fs->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setAllowBlank(false)->setVtype('alphanum'); $this->_componentField = $fields->add(new Kwf_Form_Field_Select('component', trlKwf('Pagetype')))->setValues($componentNames)->setPossibleComponentClasses($componentClasses)->setTpl('<tpl for="."><div class="x2-combo-list-item">{name}</div></tpl>')->setAllowBlank(false); $hideInMenuText = trlKwf('Hide in Menu'); $fs = $fields; if ($this->_generator->getUseMobileBreakpoints()) { $fs = $fields->add(new Kwf_Form_Container_FieldSet(trlKwf('Menu settings'))); $hideInMenuText = trlKwf('Hide'); $fs->add(new Kwf_Form_Field_Select('device_visible', trlKwf('Device visible')))->setListWidth(250)->setDefaultValue(Kwf_Component_Data::DEVICE_VISIBLE_ALL)->setValues(array(Kwf_Component_Data::DEVICE_VISIBLE_ALL => trlKwf('show on all devices'), Kwf_Component_Data::DEVICE_VISIBLE_HIDE_ON_MOBILE => trlKwf('hide on mobile devices'), Kwf_Component_Data::DEVICE_VISIBLE_ONLY_SHOW_ON_MOBILE => trlKwf('only show on mobile devices')))->setTpl('<tpl for="."> <div class="x2-combo-list-item"> <tpl if="id==\'' . Kwf_Component_Data::DEVICE_VISIBLE_ALL . '\'"><img src="/assets/kwf/images/devices/showAll.png" class="left"/></tpl> <tpl if="id==\'' . Kwf_Component_Data::DEVICE_VISIBLE_HIDE_ON_MOBILE . '\'"><img src="/assets/kwf/images/devices/smartphoneHide.png" class="left"/></tpl> <tpl if="id==\'' . Kwf_Component_Data::DEVICE_VISIBLE_ONLY_SHOW_ON_MOBILE . '\'"><img src="/assets/kwf/images/devices/smartphone.png" class="left"/></tpl> <p class="left" style="margin-left: 3px; line-height: 16px;">{name}</p> </div> </tpl>'); } $fs->add(new Kwf_Form_Field_Checkbox('hide', $hideInMenuText)); foreach (Kwf_Component_Data_Root::getInstance()->getPlugins('Kwf_Component_PluginRoot_Interface_GeneratorProperty') as $plugin) { $params = $plugin->getGeneratorProperty($this->_generator); if ($params) { $this->add(new Kwf_Form_Field_Select($params['name'], $params['label']))->setValues($params['values'])->setDefaultValue($params['defaultValue'])->setWidth(300)->setData(new Kwf_Component_PluginRoot_GeneratorProperty_Data($plugin, $this)); } } }
protected function _init() { $this->setModel(new Kwf_Model_FnF()); $this->add(new Kwf_Form_Field_TextField('fullname', 'Name'))->setAllowBlank(false); $cards = $this->fields->add(new Kwf_Form_Container_Cards('type', trl('Example'))); $cards->getCombobox()->setDefaultValue('foo'); $card = $cards->add(); $card->setName('foo'); $card->setTitle('Foo'); $card->fields->add(new Kwf_Form_Field_TextField('foo_value', trl('Foo')))->setAllowBlank(false); $card = $cards->add(); $card->setName('bar'); $card->setTitle('Bar'); $card->fields->add(new Kwf_Form_Field_TextField('bar_value', trl('Bar')))->setAllowBlank(false); parent::_init(); }
protected function _init() { parent::_init(); $this->add(new Kwf_Form_Field_TextField('wrappertext', 'Wrappertext')); $services = new Kwf_Form_CardsRealModels_Model_WrapperTable(); $cards = $this->add(new Kwf_Form_Container_Cards('type', trlKwf('Type'))); $cards->getCombobox()->setAllowBlank(false); $form = new Kwf_Form_CardsRealModels_Form_Firstname(); $card = $cards->add(); $card->setTitle("Firstname"); $card->setName("sibfirst"); $card->add($form); $form = new Kwf_Form_CardsRealModels_Form_Lastname(); $card = $cards->add(); $card->setTitle("Lastname"); $card->setName("siblast"); $card->add($form); }
protected function _init() { parent::_init(); $this->add(new Kwf_Form_Field_Password('old_password', trlKwfStatic('Your Password')))->addValidator(new Kwf_Validate_UserPassword())->setAllowBlank(false); }
protected function _init() { parent::_init(); $this->setModel(new Kwf_Model_FnF()); $this->add(new Kwc_User_LostPassword_Form_UserEMail('email', trlKwfStatic('E-Mail')))->setAllowBlank(false)->setWidth(200)->setLabelWidth(50); }
protected function _init() { $this->setIdTemplate('{0}'); parent::_init(); }
protected function _init() { $this->setModel(new Kwf_Model_FnF()); $this->add(new Kwf_Form_Field_TextField('query', trlKwfStatic('Name'))); parent::_init(); }
protected function _init() { $this->add(new Kwf_Form_Field_TextField('text', trlStatic('Text'))); parent::_init(); }
protected function _init() { parent::_init(); $this->add(new Kwf_Form_Field_TextArea('content', trlKwfStatic('Create Post')))->setWidth('100%')->setHeight(150)->setAllowBlank(false)->setLabelAlign('top'); }