protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "_video", 'video');
     $form->setIdTemplate('{0}_video');
     $this->add($form);
 }
 public function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_EMailField('mail', trlKwf('E-Mail address')))->setWidth(300);
     $this->add(new Kwf_Form_Field_TextField('subject', trlKwf('Subject of E-Mail')))->setWidth(300);
     $this->add(new Kwf_Form_Field_TextArea('text', trlKwf('Predefined text of E-Mail')))->setWidth(300)->setHeight(200);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $masterCC = Kwc_Abstract::getSetting($this->getClass(), 'masterComponentClass');
     if (Kwc_Abstract::getSetting($masterCC, 'imageCaption')) {
         $this->add(new Kwf_Form_Field_ShowField('original_image_caption', trlKwf('Original Image caption')))->setData(new Kwf_Data_Trl_OriginalComponent('image_caption'));
         $this->add(new Kwf_Form_Field_TextField('image_caption', trlKwf('Image caption')))->setWidth(300);
     }
     if (Kwc_Abstract::getSetting($masterCC, 'editFilename') || Kwc_Abstract::getSetting($masterCC, 'altText') || Kwc_Abstract::getSetting($masterCC, 'titleText')) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet('SEO'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
     }
     if (Kwc_Abstract::getSetting($masterCC, 'editFilename')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_filename', trlKwf('Original {0}', trlKwf('Filename'))))->setData(new Kwf_Data_Trl_OriginalComponent('filename'));
         $fs->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setWidth(300)->setHelpText(trlKwf('Talking filename ("lorem-ipsum-2015"), hyphens and underscores are allowed.'));
     }
     if (Kwc_Abstract::getSetting($masterCC, 'altText')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_alt_text', trlKwf('Original {0}', 'ALT Text')))->setData(new Kwf_Data_Trl_OriginalComponent('alt_text'));
         $fs->add(new Kwf_Form_Field_TextField('alt_text', 'ALT Text'))->setWidth(300)->setHelpText(trlKwf('Short, meaningful description of the image content.'));
     }
     if (Kwc_Abstract::getSetting($masterCC, 'titleText')) {
         $fs->add(new Kwf_Form_Field_ShowField('original_title_text', trlKwf('Original {0}', 'ALT Text')))->setData(new Kwf_Data_Trl_OriginalComponent('title_text'));
         $fs->add(new Kwf_Form_Field_TextField('title_text', 'IMG Title'))->setWidth(300)->setHelpText(trlKwf('Some browsers show the text as a tooltip when the mouse pointer is hovering the image.'));
     }
     $this->add(new Kwf_Form_Field_ShowField('image', trlKwf('Original Image')))->setData(new Kwc_Abstract_Image_Trl_Form_ImageData());
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Image')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_image');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-image', 'image'));
 }
 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->add(new Kwf_Form_Field_UrlField('target', trlKwf('Url')))->setWidth(450)->setHelpText(trlKwf('Enter the Internetaddress including "http://". For example if you want to link to Google.com, type "http://www.google.com" into the textfield.'))->setAllowBlank(false)->setVtype('urltel');
     if (Kwc_Abstract::getSetting($class, 'hasPopup')) {
         // cards container erstellen und zu form hinzufügen
         $cards = $this->add(new Kwf_Form_Container_Cards('open_type', trlKwf('Open in')));
         $cards->getCombobox()->setAllowBlank(false);
         $card = $cards->add();
         $card->setTitle(trlKwf('Same window'));
         $card->setName('self');
         $card = $cards->add();
         $card->setTitle(trlKwf('New window'));
         $card->setName('blank');
         $card = $cards->add();
         $card->setTitle(trlKwf('Popup'));
         $card->setName('popup');
         $card->add(new Kwf_Form_Field_TextField('width', 'Width'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
         $card->add(new Kwf_Form_Field_TextField('height', 'Height'))->setDefaultValue(400)->setAllowBlank(false)->setVtype('alphanum');
         $card->add(new Kwf_Form_Field_Checkbox('menubar', 'Menubar'));
         $card->add(new Kwf_Form_Field_Checkbox('toolbar', 'Toolbar'));
         $card->add(new Kwf_Form_Field_Checkbox('locationbar', 'Locationbar'));
         $card->add(new Kwf_Form_Field_Checkbox('statusbar', 'Statusbar'));
         $card->add(new Kwf_Form_Field_Checkbox('scrollbars', 'Scrollbars'));
         $card->add(new Kwf_Form_Field_Checkbox('resizable', 'Resizable'));
     }
 }
 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->setXtype('Kwc.Basic.DownloadTag');
     $this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(trlKwf('Enter the name (without file extension), the file should get when downloading it.'))->setWidth(300)->setAllowBlank(false);
 }
 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->setXtype('Kwc.Basic.DownloadTag');
     $this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(hlpKwf('kwf_download_filename'))->setWidth(300)->setAllowBlank(false);
 }
 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $this->setLabelWidth(200);
     $this->fields->add(new Kwf_Form_Field_TextField('company', trlKwf('Company')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('name', trlKwf('Name')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('address', trlKwf('Address')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('zipcode', trlKwf('Zipcode')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('city', trlKwf('City')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('fon', trlKwf('Fon')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('fax', trlKwf('Fax')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('mobile', trlKwf('Mobile')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('email', trlKwf('EMail')))->setWidth(300)->setVtype('email');
     $this->fields->add(new Kwf_Form_Field_TextField('website', trlKwf('Website')))->setWidth(300)->setVtype('url');
     $this->fields->add(new Kwf_Form_Field_TextField('crn', trlKwf('Commercial register number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('register_court', trlKwf('Register court')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('court', trlKwf('Court')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('uid_number', trlKwf('VAT identification number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bank_data', trlKwf('Bank data')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bank_code', trlKwf('Bank code')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('account_number', trlKwf('Account number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('iban', trlKwf('IBAN')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('bic_swift', trlKwf('BIC / SWIFT')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('dvr_number', trlKwf('Data handling register number')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('club_number_zvr', trlKwf('Clubnumber ZVR')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextArea('job_title', trlKwf('Job title')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('agency', trlKwf('Agency')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('employment_specification', trlKwf('Employment specification')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_TextField('link_company_az', trlKwf('Entry at WK Austria')))->setWidth(300)->setVtype('url');
 }
Exemple #8
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     if (!$this->getClass()) {
         return;
     }
     $generators = Kwc_Abstract::getSetting($this->getClass(), 'generators');
     $classes = $generators['child']['component'];
     foreach ($classes as $key => $class) {
         if (!$class) {
             continue;
         }
         $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-{$key}", $key);
         if ($form && count($form->fields)) {
             if ($this->_getIdTemplateForChild($key)) {
                 $form->setIdTemplate($this->_getIdTemplateForChild($key));
             }
             if (!$this->_createFieldsets || !Kwc_Abstract::hasSetting($class, 'componentName')) {
                 $this->add($form);
             } else {
                 $name = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($class, 'componentName'));
                 $name = str_replace('.', ' ', $name);
                 $this->add(new Kwf_Form_Container_FieldSet($name))->setName($key)->add($form);
             }
         }
     }
 }
 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $this->setLabelWidth(200);
     $this->fields->add(new Kwf_Form_Field_TextField('disclaimer_name', trlKwf('Disclaimer name')))->setWidth(300);
     $this->fields->add(new Kwf_Form_Field_Select('disclaimer_type', trlKwf('Disclaimer type')))->setValues($this->_getDisclaimerText())->setWidth(300);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Visible')));
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-child", 'child');
     $this->add($form);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->prepend(new Kwf_Form_Field_NumberField('columns'))->setFieldLabel(trlKwf('Columns'))->setAllowNegative(false)->setAllowDecimals(false)->setMinValue(1)->setMaxValue(10)->setAllowBlank(false)->setWidth(50);
     $this->fields->add(new Kwf_Form_Field_Select('show_pics'))->setFieldLabel(trlKwf('Visible Pictures'))->setWidth(100)->setShowNoSelection(true)->setEmptyText(trlKwf('Show all'))->setValues(array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', '8' => '8'));
     $this->fields->add(new Kwf_Form_Field_Static(trlKwf('Choose a number to just show this number of items and hide the others behind a "more"-button')));
 }
 protected function _initFields()
 {
     $this->setCreateMissingRow(true);
     parent::_initFields();
     $tagsControllerUrl = Kwc_Abstract_Admin::getInstance($this->getClass())->getControllerUrl();
     $this->add(new Kwf_Form_Field_SuperBoxSelect('ComponentToTag', 'Tag', trlKwf('Tags')))->setWidth(300)->setListWidth(300)->setTpl('<tpl for="."><div class="x2-combo-list-item">{name} <span style="font-size: 10px; color: gray;">({count_used} ' . trlKwf('uses') . ')</span></div></tpl>')->setAllowAddNewData(true)->setTriggerAction('all')->setMinChars(1)->setValues($tagsControllerUrl . '/json-data')->setAddNewItemUrl($tagsControllerUrl . '/json-add-item');
 }
 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 _init()
 {
     parent::_init();
     $this->setLabelWidth(150);
     $this->add(new Kwf_Form_Field_TextField('url', trl('Application URL')))->setWidth(500)->setAllowBlank(false);
     $this->add(new Kwf_Form_Field_ShowField('template_url', trl('HTML Template URL')))->setWidth(500)->setData(new Kwc_Advanced_IntegratorTemplate_FormData());
 }
 protected function _beforeSave(Kwf_Model_Row_Interface $row)
 {
     parent::_beforeSave($row);
     if (!$row->infotext) {
         $row->infotext = $this->getByName('downloadTag')->getRow($row)->getParentRow('File')->filename;
     }
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     $this->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-linktext', 'linktext'));
     $this->add(new Kwf_Form_Field_Checkbox('start_opened', trlKwf('Start opened')));
 }
 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(trlKwf('Text, shown after the file icon (automatically generated) and used as link for downloading the file.'));
     $this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '_mail');
     $form->setIdTemplate('{component_id}_{id}_mail');
     $this->add($form);
     $this->add(new Kwf_Form_Field_ShowField('create_date', trlKwf('Creation Date')))->setWidth(300);
 }
 public function getCardForms()
 {
     $ret = array();
     $title = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($this->_class, 'componentName'));
     $title = str_replace('.', ' ', $title);
     $ret['form'] = array('form' => Kwc_Abstract_Form::createComponentForm($this->_class, 'child'), 'title' => $title);
     return $ret;
 }
 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $form = Kwc_Abstract_Form::createChildComponentForm($class, '-downloadTag');
     $this->add($form);
     $this->add(new Kwf_Form_Field_TextField('infotext', trlKwf('Descriptiontext')))->setWidth(300)->setHelpText(hlpKwf('kwc_download_linktext'));
     $this->add(new Kwf_Form_Field_ShowField('original_infotext', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('infotext'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwfStatic('Social Media')));
     $fs->add(new Kwf_Form_Field_Checkbox('facebook', trlKwfStatic('Facebook')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Facebook'));
     $fs->add(new Kwf_Form_Field_Checkbox('twitter', trlKwfStatic('Twitter')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Twitter'));
     $fs->add(new Kwf_Form_Field_Checkbox('google', trlKwfStatic('Google+')))->setHideLabel(true)->setBoxLabel(trlKwfStatic('Google+'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->setCreateMissingRow(true);
     $this->setModel(new Kwf_Model_FnF());
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-linkTag", 'linkTag');
     $this->add($form);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Flash')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_flash');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-flash', 'flash'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_TextField('headline1', trlKwf('Headline 1')))->setWidth(450)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('headline2', trlKwf('Headline 2')))->setWidth(450);
     $this->fields->add(new Kwf_Form_Field_ShowField('original_headline1', trlKwf('Original headline 1')))->setData(new Kwf_Data_Trl_OriginalComponent())->getData()->setFieldname('headline1');
     $this->fields->add(new Kwf_Form_Field_ShowField('original_headline2', trlKwf('Original headline 2')))->setData(new Kwf_Data_Trl_OriginalComponent())->getData()->setFieldname('headline2');
 }
 protected function _initFields()
 {
     parent::_initFields();
     $imageTitle = Kwc_Abstract::getSetting(Kwc_Abstract::getSetting($this->getClass(), 'masterComponentClass'), 'imageTitle');
     if ($imageTitle) {
         $this->add(new Kwf_Form_Field_ShowField('original_title', trlKwf('Original Title')))->setData(new Kwf_Data_Trl_OriginalComponent('title'));
         $this->add(new Kwf_Form_Field_TextArea('title', trlKwf('Title')))->setWidth(350)->setHeight(80);
     }
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_TextField('field_label', trlKwf('Label')));
     $this->fields->add(new Kwf_Form_Field_NumberField('label_width', trlKwf('Label Width')))->setComment('px')->setWidth(50)->setAllowNegative(false)->setAllowDecimal(false);
     $this->fields->add(new Kwf_Form_Field_Checkbox('required', trlKwf('Required')));
     $this->fields->add(new Kwf_Form_Field_Checkbox('hide_label', trlKwf('Hide Label')));
     $this->fields->add(new Kwf_Form_Field_Checkbox('label_position_above', trlKwf('Label above field')));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $mf = $this->add(new Kwf_Form_Field_MultiFields('Children'));
     $mf->setWidth(400);
     $mf->setPosition(true);
     $mf->setMinEntries(0);
     $mf->fields->add($this->_getMultiFieldsFieldset());
 }
 protected function _initFields()
 {
     parent::_initFields();
     $enableTranslation = $this->add(new Kwf_Form_Container_FieldSet(trlStatic('Own Link')));
     $enableTranslation->setCheckboxToggle(true);
     $enableTranslation->setCheckboxName('own_target');
     $enableTranslation->add(new Kwf_Form_Field_TextField('target', trlKwf('Url')))->setWidth(450)->setVtype('url');
     $this->add(new Kwf_Form_Field_ShowField('original', trlKwf('Original')))->setData(new Kwc_Basic_LinkTag_Extern_Trl_Form_OriginalData());
 }
 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Own Download')));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('own_download');
     $fs->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-download', 'download'));
     $this->add(new Kwf_Form_Field_ShowField('original_filename', trlKwf('Original Filename')))->setData(new Kwc_Basic_DownloadTag_Trl_Form_OriginalData('filename'));
 }
 protected function _initFields()
 {
     parent::_initFields();
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-linkTag");
     if (count($form->fields)) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Click on Preview Image') . ':'));
         $fs->add($form);
     }
 }