diff options
| author | michael pereira | 2011-03-08 19:41:00 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-08 19:41:00 +0100 |
| commit | d44db6d338d72c6229b1ba788784c7bb90471cf0 (patch) | |
| tree | 909a6e686f8c9a8bfa491014e404376604791d9d /application/forms/BootmenuEntriesEdit.php | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-d44db6d338d72c6229b1ba788784c7bb90471cf0.tar.gz pbs2-d44db6d338d72c6229b1ba788784c7bb90471cf0.tar.xz pbs2-d44db6d338d72c6229b1ba788784c7bb90471cf0.zip | |
BootOs Name anzeigen & Reihenfolge im BootMenu
Diffstat (limited to 'application/forms/BootmenuEntriesEdit.php')
| -rw-r--r-- | application/forms/BootmenuEntriesEdit.php | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/application/forms/BootmenuEntriesEdit.php b/application/forms/BootmenuEntriesEdit.php index added01..042ae12 100644 --- a/application/forms/BootmenuEntriesEdit.php +++ b/application/forms/BootmenuEntriesEdit.php @@ -4,11 +4,17 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form { private $bootoslist; - + private $maxorder; + public function setBootoslist($bootoslist){ $this->bootoslist = $bootoslist; } + + public function setMaxorder($maxorder){ + $this->maxorder = $maxorder; + + } public function init() { @@ -52,14 +58,14 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form 'value' => '1', )); - $this->addElement('text', 'order', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'order:', - )); + $orderfield = $this->createElement('select','order'); + $orderfield ->setLabel('Order:'); + + for ($i = 0; $i <= $this->maxorder; $i++) { + $orderfield->addMultiOption($i, $i); + } + $orderfield->setRegisterInArrayValidator(false); + $this->addElement($orderfield); $this->addElement('submit', 'editbootmenuentry', array( 'required' => false, |
