forked from koala-framework/koala-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form.php
45 lines (41 loc) · 1.97 KB
/
Form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
class Kwc_Basic_LinkTag_Extern_Form extends Kwc_Abstract_Form
{
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(hlpKwf('kwc_basic_linktag_extern_target'))
->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'));
}
}
}