protected function _initFields()
 {
     $tabs = $this->_form->add(new Kwf_Form_Container_Tabs());
     $tabs->setActiveTab(0);
     // **** General Info
     $tab = $tabs->add();
     $tab->setTitle(trlKwf('General Info'));
     $companyModel = Kwf_Model_Abstract::getInstance('Companies');
     $companySelect = $companyModel->select();
     $docTypeModel = Kwf_Model_Abstract::getInstance('Linkdata');
     $docTypeSelect = $docTypeModel->select()->whereEquals('name', 'Типы документов');
     $docGradeModel = Kwf_Model_Abstract::getInstance('Linkdata');
     $docGradeSelect = $docGradeModel->select()->whereEquals('name', 'Оценки');
     $tab->fields->add(new Kwf_Form_Field_Select('typeId', trlKwf('Type')))->setValues($docTypeModel)->setSelect($docTypeSelect)->setWidth(400)->setAllowBlank(false);
     $tab->fields->add(new Kwf_Form_Field_TextField('number', trlKwf('Number')))->setWidth(400)->setAllowBlank(false);
     $tab->fields->add(new Kwf_Form_Field_DateField('startDate', trlKwf('Doc Start Date')))->setAllowBlank(false);
     $tab->fields->add(new Kwf_Form_Field_DateField('endDate', trlKwf('Doc End Date')))->setAllowBlank(true);
     $tab->fields->add(new Kwf_Form_Field_Select('companyId', trlKwf('Spec Doc company')))->setValues($companyModel)->setSelect($companySelect)->setWidth(400)->setAllowBlank(false);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Grade'));
     $fs->setCheckboxToggle(true);
     $fs->setCheckboxName('gradeVisible');
     $gradeSelect = new Kwf_Form_Field_Select('gradeId', trlKwf('Grade'));
     $gradeSelect->setValues($docGradeModel);
     $gradeSelect->setSelect($docGradeSelect);
     $gradeSelect->setWidth(360);
     $gradeSelect->setAllowBlank(true);
     $fs->fields->add($gradeSelect);
     $tab->fields->add($fs);
     $tab->fields->add(new Kwf_Form_Field_TextArea('comment', trlKwf('Comment')))->setHeight(70)->setWidth(400);
     $tab = $tabs->add();
     $tab->setTitle(trlKwf('File'));
     $tab->fields->add(new Kwf_Form_Field_File('Picture', trlKwf('File')))->setShowPreview(false)->setAllowOnlyImages(true);
     $tab->fields->add(new Kwf_Form_Field_ImageViewer('picture_id', trlKwf('Image'), 'Picture'));
 }
 /**
  * MultiFields content fields.
  *
  * @return array $fields The fields that should be inserted.
  */
 protected function _getMultiFieldsFieldset()
 {
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Paragraph {0}'));
     $fs->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Visible')));
     $fs->add(new Kwf_Form_Field_SimpleAbstract('edit'))->setXtype('kwc.listeditbutton')->setLabelSeparator('')->setData(new Kwc_Abstract_List_FormWithEditButton_NoSaveData('id'));
     return $fs;
 }
Example #3
0
 public function getPagePropertiesForm()
 {
     $ret = new Kwc_Abstract_Cards_Trl_Form(null, $this->_class);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Link'));
     foreach ($ret as $f) {
         $ret->fields->remove($f);
         $fs->add($f);
     }
     $ret->add($fs);
     return $ret;
 }
 public function getPagePropertiesForm($config)
 {
     $ret = new Kwc_Basic_LinkTag_Form(null, $this->_class);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Link'));
     foreach ($ret as $f) {
         $ret->fields->remove($f);
         $fs->add($f);
     }
     $ret->add($fs);
     return $ret;
 }
Example #5
0
 public function getPagePropertiesForm($config)
 {
     $c = $config['component'];
     if ($config['mode'] == 'add' || $c->isPage) {
         $form = new Kwc_Box_MetaTagsContent_Form(null, $this->_class);
         $fs = new Kwf_Form_Container_FieldSet(trlKwf('SEO'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
         foreach ($form as $f) {
             $form->fields->remove($f);
             $fs->add($f);
         }
         $form->add($fs);
         return $form;
     }
     return null;
 }
Example #6
0
 protected function _initFields()
 {
     parent::_initFields();
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Form Properties'));
     $fs->add(new Kwf_Form_Field_TextField('subject', trlKwf('E-Mail Subject')))->setWidth(400);
     $fs->add(new Kwf_Form_Field_TextField('submit_caption', trlKwf('Submit Caption')))->setWidth(400);
     $this->add($fs);
     $hiddenField = new Kwf_Form_Field_Hidden('send_confirm_mail');
     $hiddenField->setData(new Kwc_Form_Dynamic_Trl_Data());
     $cards = new Kwf_Form_Container_Cards();
     $cards->setCombobox($hiddenField);
     $card = $cards->add(new Kwf_Form_Container_Card());
     $card->setName('0');
     $card = $cards->add(new Kwf_Form_Container_Card());
     $card->setName('1');
     $fs = $card->add(new Kwf_Form_Container_FieldSet(trlKwf('Send copy to User')));
     $fs->add(new Kwf_Form_Field_TextField('confirm_subject', trlKwf('Subject')))->setWidth(300)->setAllowBlank(false);
     $this->add($cards);
 }
 public function getPagePropertiesForm($config)
 {
     $c = $config['component'];
     $form = null;
     if ($config['mode'] == 'add' || $c->isPage) {
         $form = new Kwc_Box_MetaTagsContent_Trl_Form(null, $this->_class);
     } else {
         if (Kwc_Abstract::getFlag($c->componentClass, 'subroot') || $c->componentId == 'root') {
             $form = new Kwc_Box_MetaTagsContent_Trl_SubrootForm(null, $this->_class);
         }
     }
     if ($form) {
         $fs = new Kwf_Form_Container_FieldSet(trlKwf('SEO, Open Graph, Sitemap'));
         $fs->setCollapsible(true);
         $fs->setCollapsed(true);
         foreach ($form as $f) {
             $form->fields->remove($f);
             $fs->add($f);
         }
         $form->add($fs);
         return $form;
     }
     return null;
 }
Example #8
0
 protected function _initFields()
 {
     parent::_initFields();
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Form Properties'));
     $fs->add(new Kwf_Form_Field_TextField('recipient', trlKwf('E-Mail Recipient')))->setVtype('email')->setWidth(400);
     $fs->add(new Kwf_Form_Field_TextField('recipient_cc', trlKwf('E-Mail CC')))->setVtype('email')->setWidth(400);
     $fs->add(new Kwf_Form_Field_TextField('subject', trlKwf('E-Mail Subject')))->setWidth(400);
     $fs->add(new Kwf_Form_Field_TextField('submit_caption', trlKwf('Submit Caption')))->setWidth(400);
     $this->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Send copy to User'));
     $this->add($fs)->setCheckboxToggle(true)->setCheckboxName('send_confirm_mail');
     $fs->add(new Kwf_Form_Field_Select('confirm_field_component_id', trlKwf('E-Mail Field')))->setAllowBlank(false)->setValues(Kwc_Admin::getInstance($this->getClass())->getControllerUrl('EmailFields') . '/json-data');
     $fs->add(new Kwf_Form_Field_TextField('confirm_subject', trlKwf('Subject')))->setWidth(300)->setAllowBlank(false);
     $this->add(Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-form'));
 }
 protected function _getFormField()
 {
     $ret = new Kwf_Form_Container_FieldSet();
     $ret->setTitle($this->getRow()->title);
     return $ret;
 }
Example #10
0
 protected function _initFields()
 {
     $tabs = $this->_form->add(new Kwf_Form_Container_Tabs());
     $tabs->setActiveTab(0);
     // **** Persönliche Daten
     $tab = $tabs->add();
     $tab->setTitle('Person');
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Name and Birthdate'));
     $fs->fields->add(new Kwf_Form_Field_TextField('firstname', trlKwf('Firstname')))->setAllowBlank(false)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('lastname', trlKwf('Lastname')))->setWidth(300)->setAllowBlank(false);
     $fs->fields->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_Select('sex', trlKwf('Sex')))->setValues(array('male' => trlKwf('Male'), 'female' => trlKwf('Female')))->setAllowBlank(false);
     $fs->fields->add(new Kwf_Form_Field_DateField('birth_date', trlKwf('Birthdate')));
     $fs->fields->add(new Kwf_Form_Field_TextField('birth_place', trlKwf('Birthplace')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Active')));
     $fs->fields->add(new Kwf_Form_Field_File('Picture', trlKwf('Photo')));
     $fs->fields->add(new Kwf_Form_Field_GoogleMapsField('position', trlKwf('Position')));
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Foreign Languages'));
     $multifields = new Kwf_Form_Field_MultiFields('MemberLanguages');
     $multifields->setMinEntries(0);
     $multifields->fields->add(new Kwf_Form_Field_PoolSelect('language_id', trlKwf('Language')))->setPool('Languages')->setAllowBlank(false);
     $fs->fields->add($multifields);
     $tab->fields->add($fs);
     // **** Beruf
     $tab = $tabs->add();
     $tab->setTitle(trlKwf('Job'));
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Job'));
     $fs->setLabelWidth(150);
     $fs->fields->add(new Kwf_Form_Field_PoolSelect('branch_id', trlKwf('Branch Category')))->setPool('Branches')->setListWidth(300)->setWidth(300)->setShowNoSelection(true)->setAllowBlank(true);
     $fs->fields->add(new Kwf_Form_Field_TextField('subbranch', trlKwf('Branch')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('branch_note', trlKwf('Branch Note')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextArea('business_title', trlKwf('Business Title')))->setWidth(300)->setHeight(40)->setMaxLength(170);
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Company adresse'));
     $fs->setLabelWidth(150);
     $fs->fields->add(new Kwf_Form_Field_TextField('company', trlKwf('Company')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_address', trlKwf('Address')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_postcode', trlKwf('ZIP')))->setWidth(100);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_city', trlKwf('City')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_SelectCountry('company_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_email', trlKwf('E-Mail')))->setWidth(300)->setVtype('email');
     $fs->fields->add(new Kwf_Form_Field_TextField('company_url', trlKwf('Url')))->setWidth(300)->setVtype('url');
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Telephone'));
     $fs->fields->add(new Kwf_Form_Field_SelectCountry('company_telephone_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_telephone_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('company_telephone', trlKwf('Number')));
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Mobile'));
     $fs->fields->add(new Kwf_Form_Field_Select('company_mobile_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_mobile_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('company_mobile', trlKwf('Number')));
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Fax'));
     $fs->fields->add(new Kwf_Form_Field_Select('company_fax_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('company_fax_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('company_fax', trlKwf('Number')));
     $tab->fields->add($fs);
     // **** Privat
     $tab = $tabs->add();
     $tab->setTitle(trlKwf('Private'));
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Adress'));
     $fs->setLabelWidth(130);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_address', trlKwf('Adress')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_postcode', trlKwf('ZIP')))->setWidth(100);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_city', trlKwf('City')))->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_Select('private_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_email', trlKwf('E-Mail')))->setWidth(300)->setVtype('email');
     $fs->fields->add(new Kwf_Form_Field_TextField('private_url', trlKwf('Url')))->setWidth(300)->setVtype('url');
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Telephone'));
     $fs->fields->add(new Kwf_Form_Field_Select('private_telephone_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_telephone_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('private_telephone', trlKwf('Number')));
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Mobile'));
     $fs->fields->add(new Kwf_Form_Field_Select('private_mobile_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_mobile_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('private_mobile', trlKwf('Number')));
     $tab->fields->add($fs);
     $fs = new Kwf_Form_Container_FieldSet(trlKwf('Fax'));
     $fs->fields->add(new Kwf_Form_Field_Select('private_fax_country', trlKwf('Country')))->setShowNoSelection(true)->setListWidth(300)->setWidth(300);
     $fs->fields->add(new Kwf_Form_Field_TextField('private_fax_pre', trlKwf('Area Code')));
     $fs->fields->add(new Kwf_Form_Field_TextField('private_fax', trlKwf('Number')));
     $tab->fields->add($fs);
 }