Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 protected function _init()
 {
     parent::_init();
     $this->setLoadAfterSave(true);
     $gen = Kwc_Abstract::getSetting($this->getClass(), 'generators');
     $classes = $gen['child']['component'];
     $cards = $this->add(new Kwf_Form_Container_Cards('component', trlKwf('Type')))->setDefaultValue(key($classes));
     $cards->getCombobox()->setWidth(250)->setListWidth(250)->setXtype('kwc.abstract.cards.combobox')->setValues(Kwc_Admin::getInstance($this->getClass())->getControllerUrl('Components') . '/json-data');
     foreach ($classes as $name => $class) {
         if (!$class) {
             continue;
         }
         $forms = array();
         $admin = Kwc_Admin::getInstance($class);
         $forms = $admin->getCardForms();
         if (!$forms) {
             //wenns gar keine forms gibt
             $card = $cards->add();
             $card->setTitle(Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($class, 'componentName')));
             $card->setName($name);
         }
         foreach ($forms as $k => $i) {
             $form = $i['form'];
             if ($form) {
                 if (!$form->getIdTemplate()) {
                     $form->setIdTemplate('{0}-child');
                 }
                 $form->setAutoHeight(true);
                 $form->setBaseCls('x2-plain');
             }
             $card = $cards->add();
             $card->setTitle($i['title']);
             if (count($forms) == 1) {
                 $card->setName($name);
                 if ($form) {
                     $form->setName($name);
                 }
             } else {
                 $card->setName($name . '_' . $k);
                 //damits eindeutig ist wenn zB news mehrere forms hat
                 if ($form) {
                     $form->setName($name . '_' . $k);
                 }
             }
             if ($form) {
                 $card->add($form);
             }
         }
     }
 }
Ejemplo n.º 3
0
 protected function _init()
 {
     parent::_init();
     $gen = Kwc_Abstract::getSetting($this->getClass(), 'generators');
     $classes = $gen['child']['component'];
     $cards = $this->add(new Kwf_Form_Container_Cards('component', trlKwf('Type')))->setDefaultValue(key($classes));
     $hidden = new Kwf_Form_Field_Hidden('component');
     $hidden->setData(new Kwc_Abstract_Cards_Trl_Form_ComponentData());
     $cards->setCombobox($hidden);
     foreach ($classes as $name => $class) {
         $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), '-' . $name, $name);
         if ($form) {
             $form->setIdTemplate('{0}-child');
             $form->setAutoHeight(true);
             $form->setBaseCls('x2-plain');
         }
         $card = $cards->add();
         $card->setName($name);
         if ($form) {
             $card->add($form);
         }
     }
 }
Ejemplo n.º 4
0
 protected function _init()
 {
     parent::_init();
     $this->add(new Kwf_Form_Field_TextField('text', 'Text'));
 }