summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms/Bootos.php
diff options
context:
space:
mode:
authormichael pereira2011-03-30 17:23:30 +0200
committermichael pereira2011-03-30 17:23:30 +0200
commita29a04821929e737a436b842e519845d0d29da94 (patch)
treea855b6cc3bfbff0399eba5c22a540dcf90932626 /application/modules/user/forms/Bootos.php
parentFBGui angepasst (button) (diff)
downloadpbs2-a29a04821929e737a436b842e519845d0d29da94.tar.gz
pbs2-a29a04821929e737a436b842e519845d0d29da94.tar.xz
pbs2-a29a04821929e737a436b842e519845d0d29da94.zip
Bootos & Bootiso
Diffstat (limited to 'application/modules/user/forms/Bootos.php')
-rw-r--r--application/modules/user/forms/Bootos.php49
1 files changed, 35 insertions, 14 deletions
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php
index 5597f49..f56761b 100644
--- a/application/modules/user/forms/Bootos.php
+++ b/application/modules/user/forms/Bootos.php
@@ -27,9 +27,11 @@ class user_Form_Bootos extends Zend_Form
{
$this->setName("BootOsCreate");
$this->setMethod('post');
-
- if ($this->rights == 'meta')
+
+ if ($this->rights == "meta")
$meta = true;
+ else
+ $meta = null;
$this->addElement('text', 'title', array(
'filters' => array('StringTrim'),
@@ -39,6 +41,17 @@ class user_Form_Bootos extends Zend_Form
'required' => true,
'label' => 'Title:',
));
+
+ $this->addElement('textarea', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
+ 'label' => 'Description:',
+ ));
$configfield = $this->createElement('select','configID');
$configfield ->setLabel('Config:');
@@ -49,6 +62,7 @@ class user_Form_Bootos extends Zend_Form
$configfield->addMultiOption($c->getID(), $c->getTitle());
}
}
+
$configfield->setRegisterInArrayValidator(false);
$this->addElement($configfield);
@@ -86,17 +100,6 @@ class user_Form_Bootos extends Zend_Form
'label' => 'Default-KCL:',
));
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Description:',
- ));
-
$date = new DateTime();
$date->add(new DateInterval('P1Y'));
$this->addElement('text', 'expires', array(
@@ -114,6 +117,8 @@ class user_Form_Bootos extends Zend_Form
$publicfield->setLabel('Public:');
$publicfield->addMultiOption(0, '0. Eigene Gruppe');
$publicfield->setAttrib('readOnly', $meta);
+ $publicfield->setAttrib('id', 'depth');
+ $publicfield->setAttrib('onchange', "$('#groups .v1').show();changeDepth();");
for($i=1; $i<$this->groupdepth; $i++){
$publicfield->addMultiOption($i, "$i. Untergruppe");
@@ -137,8 +142,24 @@ class user_Form_Bootos extends Zend_Form
'onclick' => 'self.location="/user/bootos"'
));
- }
+ ?>
+ <script>changeDepth();
+ function changeDepth(){
+ i = $("#depth option:selected").val();
+ $('#depthimg').attr('src','/stats/graphgroup/level/' + i);
+ }</script>
+ <div id='groups' style='text-align: center;'>
+ <div class='v1' >
+ <img id=depthimg src='/stats/graphgroup/'/>
+ </div>
+ </div>
+
+<?php
+ }
+
+
}
+?>