protected function _initFields()
 {
     parent::_initFields();
     $showDirectoryClass = Kwc_Abstract::getSetting($this->getClass(), 'showDirectoryClass');
     $hideDirectoryClasses = Kwc_Abstract::getSetting($this->getClass(), 'hideDirectoryClasses');
     $cards = $this->add(new Kwf_Form_Container_Cards('source_component_id', trlKwf('Directory')));
     $defaultCard = null;
     $categories = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Directories_Category_Directory_Component');
     foreach ($categories as $category) {
         $itemDirectory = $category->parent;
         if (is_instance_of($itemDirectory->componentClass, $showDirectoryClass)) {
             foreach ($hideDirectoryClasses as $c) {
                 if (is_instance_of($itemDirectory->componentClass, $c)) {
                     continue 2;
                 }
             }
             $categoriesModel = $category->getComponent()->getChildModel();
             $select = $categoriesModel->select()->whereEquals('component_id', $category->componentId);
             $values = array();
             foreach ($categoriesModel->getRows($select) as $row) {
                 $values[$row->id] = $row->name;
             }
             $card = $cards->add();
             $card->setTitle($category->parent->getTitle());
             $card->setName($category->componentId);
             if (!$defaultCard) {
                 $defaultCard = $category->componentId;
             }
             $model = Kwf_Model_Abstract::getInstance('Kwc_Directories_Category_ShowCategories_Model');
             $card->add(new Kwf_Form_Field_MultiCheckboxLegacy($model, trlKwf('Categories')))->setValues($values)->setReferences(array('columns' => array('component_id'), 'refColumns' => array('id')))->setColumnName('category_id');
         }
     }
     $cards->setDefaultValue($defaultCard);
 }
 protected function _initFields()
 {
     $this->add(new Kwf_Form_Field_TextField('text', trlKwf('Linktext')))->setWidth(300);
     $this->add(new Kwf_Form_Field_Panel('copy'))->setHideLabel(true)->setXtype('kwc.basic.link.trl.copybutton');
     $this->add(new Kwf_Form_Field_ShowField('original_text', trlKwf('Original')))->setData(new Kwf_Data_Trl_OriginalComponent('text'));
     parent::_initFields();
 }
 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $cards = $this->fields->add(new Kwf_Form_Container_Cards('source_type', trlKwf('Video Source Type')));
     $cards->getCombobox()->setAllowBlank(false);
     $card = $cards->add();
     $card->setName('files');
     $card->setTitle(trlKwf('Files'));
     $fs = $card->add(new Kwf_Form_Container_FieldSet(trlKwf('Files')));
     $fs->add(new Kwf_Form_Field_File('FileMp4', trlKwf('Mp4 file')))->setDirectory('AdvancedVideoPlayer')->setAllowOnlyImages(false);
     $fs->add(new Kwf_Form_Field_File('FileOgg', trlKwf('Ogg File')))->setDirectory('AdvancedVideoPlayer')->setAllowOnlyImages(false);
     $fs->add(new Kwf_Form_Field_File('FileWebm', trlKwf('Webm file (optional)')))->setDirectory('AdvancedVideoPlayer')->setAllowOnlyImages(false);
     $card = $cards->add();
     $card->setName('links');
     $card->setTitle(trlKwf('Links'));
     $fs = $card->add(new Kwf_Form_Container_FieldSet(trlKwf('Links')));
     $fs->add(new Kwf_Form_Field_UrlField('mp4_url', trlKwf('Mp4 link')))->setWidth(400);
     $fs->add(new Kwf_Form_Field_UrlField('ogg_url', trlKwf('Ogg link')))->setWidth(400);
     $fs->add(new Kwf_Form_Field_UrlField('webm_url', trlKwf('Webm link')))->setWidth(400);
     $fs = $this->fields->add(new Kwf_Form_Container_FieldSet(trlKwf('Settings')))->setHelpText(trlKwf('Insert "100%" in both fields to make it responsive.'));
     $cards = $fs->add(new Kwf_Form_Container_Cards('size', trlKwf('Size')));
     $cards->getCombobox()->setWidth(300)->setListWidth(300)->setAllowBlank(false);
     $card = $cards->add(new Kwf_Form_Container_Card('contentWidth'))->setTitle(trlKwf('Stretch video to maximum width'));
     $card->add(new Kwf_Form_Field_Select('format', trlKwf('Format')))->setValues(array('16x9' => trlKwfStatic('16:9'), '4x3' => trlKwfStatic('4:3')))->setDefaultValue('16x9')->setAllowBlank(false);
     $card = $cards->add(new Kwf_Form_Container_Card('userDefined'))->setTitle(trlKwf('Set size of video'));
     $card->add(new Kwf_Form_Field_TextField('video_width', trlKwf('Width (px)')))->setWidth(80);
     $card->add(new Kwf_Form_Field_TextField('video_height', trlKwf('Height (px)')))->setWidth(80);
     $fs->add(new Kwf_Form_Field_Checkbox('loop', trlKwf('Repeat')));
     $fs->add(new Kwf_Form_Field_Checkbox('auto_play', trlKwf('Auto play')));
 }
Exemple #4
0
 protected function _initFields()
 {
     parent::_initFields();
     $backgroundColors = Kwc_Abstract::getSetting($this->getClass(), 'backgroundColors');
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Standard Adjustments')));
     $fs->add(new Kwf_Form_Field_Select('background_color', trlKwf('Background Color')))->setAllowBlank(true)->setValues($backgroundColors);
     $fs->add(new Kwf_Form_Field_NumberField('margin_bottom', trlKwf('Margin Bottom')))->setAllowBlank(true)->setWidth(30)->setComment('px');
 }
 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('Colors')))->setHelpText(trlKwf('Color values in Hex code without a leading # (e.g. fa5500)'));
     $fs->add(new Kwf_Form_Field_TextField('color_small_1', trlKwf('Color small 1')))->setWidth(80)->setVtype('alphanum');
     $fs->add(new Kwf_Form_Field_TextField('color_small_2', trlKwf('Color small 2')))->setWidth(80)->setVtype('alphanum');
     $fs->add(new Kwf_Form_Field_TextField('color_big_1', trlKwf('Color big 1')))->setWidth(80)->setVtype('alphanum');
     $fs->add(new Kwf_Form_Field_TextField('color_big_2', trlKwf('Color big 2')))->setWidth(80)->setVtype('alphanum');
 }
 protected function _initFields()
 {
     $this->add(new Kwf_Form_Field_TextArea('description', 'META Description'))->setWidth(400)->setHeight(50)->setHelpText(trlKwf('Optional, but important for SEO. Short description of the page content in about 170 characters. Important for Google, Facebook, etc.'));
     $this->add(new Kwf_Form_Field_TextField('og_title', 'Open Graph Title'))->setWidth(400);
     $this->add(new Kwf_Form_Field_TextArea('og_description', 'Open Graph Description'))->setWidth(400)->setHeight(50);
     parent::_initFields();
     $this->add(new Kwf_Form_Field_Checkbox('noindex', 'noindex'))->setBoxLabel(trlKwf("Don't index this page by search engines."));
     $this->add(new Kwf_Form_Field_Select('sitemap_priority', trlKwf('Priority')))->setValues(array('0.0' => '0.0 ' . trlKwf('Low'), '0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5 ' . trlKwf('Standard'), '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1.0' => '1.0 ' . trlKwf('High')))->setDefaultValue('0.5');
     $this->add(new Kwf_Form_Field_Select('sitemap_changefreq', trlKwf('Change Frequency')))->setValues(array('always' => trlKwf('Always'), 'hourly' => trlKwf('Hourly'), 'daily' => trlKwf('Daily'), 'weekly' => trlKwf('Weekly'), 'monthly' => trlKwf('Monthly'), 'yearly' => trlKwf('Yearly'), 'never' => trlKwf('Never')))->setDefaultValue('weekly');
 }
 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $fs = $this->fields->add(new Kwf_Form_Container_FieldSet(trlKwf('File')));
     $fs->add(new Kwf_Form_Field_File('FileMp3', trlKwf('Mp3 File')))->setDirectory('AdvancedAudioPlayer')->setAllowOnlyImages(false);
     $fs = $this->fields->add(new Kwf_Form_Container_FieldSet(trlKwf('Settings')));
     $fs->add(new Kwf_Form_Field_TextField('audio_width', trlKwf('Width (px)')))->setWidth(80);
     $fs->add(new Kwf_Form_Field_TextField('audio_height', trlKwf('Height (px)')))->setWidth(80);
     $fs->add(new Kwf_Form_Field_Checkbox('loop', trlKwf('Repeat')));
     $fs->add(new Kwf_Form_Field_Checkbox('auto_play', trlKwf('Auto play')));
 }
 protected function _initFields()
 {
     if ($this->_useFieldset) {
         $this->_generalFieldset = $this->add(new Kwf_Form_Container_FieldSet(trlKwf('General')));
         $fieldsContainer = $this->_generalFieldset;
     } else {
         $fieldsContainer = $this;
     }
     $fieldsContainer->add(new Kwf_Form_Field_TextField('email', trlKwf('E-Mail')))->setVtype('email')->setAllowBlank(false)->setWidth(250)->addValidator(new Kwc_User_Detail_General_Validate_UniqueEmail());
     $fieldsContainer->add(new Kwf_Form_Field_TextField('firstname', trlKwf('Firstname')))->setAllowBlank(false)->setWidth(250);
     $fieldsContainer->add(new Kwf_Form_Field_TextField('lastname', trlKwf('Lastname')))->setAllowBlank(false)->setWidth(250);
     $fieldsContainer->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setWidth(250);
     $fieldsContainer->add(new Kwf_Form_Field_Select('gender', trlKwf('Gender')))->setShowNoSelection(true)->setValues(array('female' => trlKwf('Female'), 'male' => trlKwf('Male')));
     parent::_initFields();
 }
 protected function _initFields()
 {
     parent::_initFields();
     $values = array();
     $model = Kwf_Model_Abstract::getInstance('Kwc_Directories_CategorySimple_CategoriesModel');
     $rows = $model->getRows();
     $values = array();
     foreach ($rows as $row) {
         $val = array();
         $val['id'] = $row->id;
         $val['value'] = $row->getTreePath();
         $values[] = $val;
     }
     $this->add(new Kwf_Form_Field_Select('category_id', trlKwf('Category')))->setValues($values)->setAllowBlank(false)->setWidth(400);
 }
Exemple #10
0
 protected function _initFields()
 {
     $this->add($this->_createImageUploadField(Kwc_Abstract::getSetting($this->getClass(), 'imageLabel')));
     if (Kwc_Abstract::getSetting($this->getClass(), 'editFilename') || Kwc_Abstract::getSetting($this->getClass(), 'altText')) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet('SEO'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'editFilename')) {
         $fs->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setAutoFillWithFilename('filename')->setVtype('alphanum')->setWidth(300);
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'altText')) {
         $fs->add(new Kwf_Form_Field_TextField('alt_text', trlKwf('Alt Text')))->setHelpText(trlKwf('Optional: Describe this image for visually handicapped people and search engines.'))->setWidth(300);
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'imageCaption')) {
         $this->add(new Kwf_Form_Field_TextField('image_caption', trlKwf('Image caption')))->setWidth(300);
     }
     parent::_initFields();
 }
 protected function _initFields()
 {
     $this->add($this->_createImageUploadField(Kwc_Abstract::getSetting($this->getClass(), 'imageLabel')));
     if (Kwc_Abstract::getSetting($this->getClass(), 'editFilename') || Kwc_Abstract::getSetting($this->getClass(), 'altText') || Kwc_Abstract::getSetting($this->getClass(), 'titleText')) {
         $fs = $this->add(new Kwf_Form_Container_FieldSet('SEO'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'editFilename')) {
         $fs->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setAutoFillWithFilename('filename')->setVtype('alphanum')->setWidth(300)->setHelpText(trlKwf('Talking filename ("lorem-ipsum-2015"), hyphens and underscores are allowed.'));
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'altText')) {
         $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($this->getClass(), 'titleText')) {
         $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.'));
     }
     if (Kwc_Abstract::getSetting($this->getClass(), 'imageCaption')) {
         $this->add(new Kwf_Form_Field_TextField('image_caption', trlKwf('Image caption')))->setWidth(300);
     }
     parent::_initFields();
 }
Exemple #12
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->prepend(new Kwf_Form_Field_TextArea('content'))->setFieldLabel(trlKwf('Content'))->setHeight(225)->setWidth(450)->setAllowTags(true);
 }
 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_TextField('anchor', trlKwf('Name')))->setMaxLength(50)->setAllowBlank(false);
 }
 protected function _initFields()
 {
     $this->add(new Kwf_Form_Field_TextField('link_text'))->setFieldLabel(trlKwf('Link text'))->setWidth(300);
     parent::_initFields();
 }
 public function __construct($name, $class)
 {
     parent::__construct($name, $class);
     $this->add(new Kwf_Form_Field_Select('image_position', trlKwf('Position of Image')))->setValues(array('left' => trlKwf('Left'), 'right' => trlKwf('Right'), 'center' => trlKwf('Center')));
 }
 protected function _initFields()
 {
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setWidth(300);
     $this->add(new Kwf_Form_Field_TextField('teaser', trlKwf('Teaser')))->setWidth(300);
     parent::_initFields();
 }
 protected function _initFields()
 {
     parent::_initFields();
     $fs = $this->add(new Kwf_Form_Container_FieldSet(trlKwf("Content")));
     $fs->fields->prepend(new Kwf_Form_Field_TextArea('content'))->setFieldLabel(trlKwf('Content'))->setHideLabel(true)->setHeight(225)->setWidth(450)->setAllowTags(true);
 }
 protected function _initFields()
 {
     $this->add(new Kwf_Form_Field_TextArea('description', 'META Description'))->setWidth(400)->setHeight(80)->setHelpText(trlKwf('Optional, but important for SEO. Short description of the page content in about 170 characters. Important for Google, Facebook, etc.'));
     parent::_initFields();
 }
 protected function _initFields()
 {
     parent::_initFields();
     $colors = Kwc_Abstract::getSetting($this->getClass(), 'colors');
     $this->add(new Kwf_Form_Field_Select('color', trlKwf('Teaser Color')))->setAllowBlank(true)->setValues($colors);
 }