SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | ||
| 3 | - | class WebPageGeneratorForm extends Nette\Application\UI\Form {
|
| 3 | + | class WebPageGeneratorForm extends Nette\Application\UI\Form |
| 4 | {
| |
| 5 | - | public function __construct(Nette\ComponentModel\IContainer $parent=NULL, $name=NULL) {
|
| 5 | + | |
| 6 | - | parent::__construct($parent, $name); |
| 6 | + | public function __construct() |
| 7 | - | $this->addContainer("body");
|
| 7 | + | {
|
| 8 | - | $this["body"]->addContainer("background");
|
| 8 | + | parent::__construct(); |
| 9 | - | $this["body"]["background"]->currentGroup = $this->addGroup("foo", FALSE);
|
| 9 | + | |
| 10 | - | $this["body"]["background"]->addText("backgroundColor", "Background color:");
|
| 10 | + | $body = $this->addContainer("body");
|
| 11 | - | $this["body"]["background"]->addText("backgroundPosition", "Background position:", $backgroundPosition);
|
| 11 | + | $bg = $body->addContainer("background");
|
| 12 | - | $this["body"]["background"]->addSelect("backgroundRepeat", "Background repeat:");
|
| 12 | + | $bg->currentGroup = $this->addGroup("foo", FALSE);
|
| 13 | - | $this["body"]["background"]->addUpload("backgroundImage", "Background image:");
|
| 13 | + | $bg->addText("color", "Background color:");
|
| 14 | - | |
| 14 | + | $bg->addText("position", "Background position:", $backgroundPosition);
|
| 15 | - | |
| 15 | + | $bg->addSelect("repeat", "Background repeat:");
|
| 16 | - | ... |
| 16 | + | $bg->addUpload("image", "Background image:");
|
| 17 | ||
| 18 | // ... | |
| 19 | } | |
| 20 | } |