summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/forms')
-rw-r--r--application/modules/user/forms/Bootiso.php7
-rw-r--r--application/modules/user/forms/Bootos.php6
-rw-r--r--application/modules/user/forms/Client.php14
-rw-r--r--application/modules/user/forms/Filter.php15
-rw-r--r--application/modules/user/forms/FilterEntry.php6
-rw-r--r--application/modules/user/forms/Pool.php10
-rw-r--r--application/modules/user/forms/PoolClient.php4
-rw-r--r--application/modules/user/forms/RoleAdd.php23
8 files changed, 65 insertions, 20 deletions
diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php
index 3aba0af..7c472c0 100644
--- a/application/modules/user/forms/Bootiso.php
+++ b/application/modules/user/forms/Bootiso.php
@@ -120,12 +120,13 @@ class user_Form_Bootiso extends Zend_Form
});
function changeDepth(){
i = $("#depth option:selected").val();
- $('#depthimg').attr('src','/stats/graphgroup/level/' + i);
- }</script>
+ $('#depthimg').attr('src','/stats/graphgroup/level/' + i);
+ }
+ </script>
<div id='groups' style='text-align: center;'>
<div class='v1'>
- <img id='depthimg' src='/stats/graphgroup/' />
+ <img alt='Please select a public level' id='depthimg' src='/stats/graphgroup/level/0' />
</div>
</div>
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php
index f56761b..5fa890a 100644
--- a/application/modules/user/forms/Bootos.php
+++ b/application/modules/user/forms/Bootos.php
@@ -144,7 +144,11 @@ class user_Form_Bootos extends Zend_Form
?>
- <script>changeDepth();
+ <script>
+ $(document).ready(function(){
+ changeDepth();
+ $('#groups .v1').show();
+ });
function changeDepth(){
i = $("#depth option:selected").val();
$('#depthimg').attr('src','/stats/graphgroup/level/' + i);
diff --git a/application/modules/user/forms/Client.php b/application/modules/user/forms/Client.php
index 9f3926c..aa8d478 100644
--- a/application/modules/user/forms/Client.php
+++ b/application/modules/user/forms/Client.php
@@ -42,17 +42,25 @@ class user_Form_Client extends Zend_Form
'required' => false,
'ignore' => true,
'label' => $this->buttontext,
- ));
+ ));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/user/client"'
- ));
+ 'onclick' => 'self.location="/user/client/index/page/'.$this->page.'"'
+ ));
+
+ $this->addElement('hidden','page', array(
+ 'value' => $this->page
+ ));
}
private $buttontext = 'Save';
private $groups;
function setButtontext($v){
$this->buttontext = $v;
}
+ private $page;
+ function setPage($page){
+ $this->page = $page;
+ }
}
diff --git a/application/modules/user/forms/Filter.php b/application/modules/user/forms/Filter.php
index 4526a61..a7a2555 100644
--- a/application/modules/user/forms/Filter.php
+++ b/application/modules/user/forms/Filter.php
@@ -27,14 +27,13 @@ class user_Form_Filter extends Zend_Form
$bootmenufield = $this->createElement('select','bootmenuID');
$bootmenufield ->setLabel('Bootmenu:');
- /*if(count($this->bootmenus)>0){
- foreach($this->bootmenus as $bm){
- foreach($bm as $id => $g){
- $bootmenufield->addMultiOption($g->getID(), $g->getTitle());
- }
+ if(count($this->bootmenus)>0){
+ foreach($this->bootmenus as $g){
+ $bootmenufield->addMultiOption($g->getID(), $g->getTitle());
+
}
- }*/
- $bootmenufield->setMultioptions($this->bootmenus);
+ }
+
$bootmenufield->setRegisterInArrayValidator(false);
$this->addElement($bootmenufield);
@@ -53,7 +52,7 @@ class user_Form_Filter extends Zend_Form
));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/user/filter"'
+ 'onclick' => 'self.location="/user/filter/index/page/'.$this->page.'"'
));
$this->addElement('hidden', 'created', array(
diff --git a/application/modules/user/forms/FilterEntry.php b/application/modules/user/forms/FilterEntry.php
index c2581c2..33453d7 100644
--- a/application/modules/user/forms/FilterEntry.php
+++ b/application/modules/user/forms/FilterEntry.php
@@ -330,7 +330,7 @@ class user_Form_FilterEntry extends Zend_Form
));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/user/filter"'
+ 'onclick' => 'self.location="/user/filter/index/page/'.$this->page.'"'
));
$this->addElement('hidden', 'filterID', array(
@@ -355,6 +355,10 @@ class user_Form_FilterEntry extends Zend_Form
function setSelectData($v){
$this->selectData = $v;
}
+ private $page;
+ function setPage($page){
+ $this->page = $page;
+ }
}
?>
diff --git a/application/modules/user/forms/Pool.php b/application/modules/user/forms/Pool.php
index 909bdd6..055d0a7 100644
--- a/application/modules/user/forms/Pool.php
+++ b/application/modules/user/forms/Pool.php
@@ -42,13 +42,21 @@ class user_Form_Pool extends Zend_Form
));
$this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/user/pool"'
+ 'onclick' => 'self.location="/user/pool/index/page/'.$this->page.'"'
));
+
+ $this->addElement('hidden','page', array(
+ 'value' => $this->page
+ ));
}
private $buttontext = 'Save';
function setButtontext($v){
$this->buttontext = $v;
}
+ private $page;
+ function setPage($page){
+ $this->page = $page;
+ }
}
diff --git a/application/modules/user/forms/PoolClient.php b/application/modules/user/forms/PoolClient.php
index 52ba7d8..c4c6e7f 100644
--- a/application/modules/user/forms/PoolClient.php
+++ b/application/modules/user/forms/PoolClient.php
@@ -26,5 +26,9 @@ class user_Form_PoolClient extends Zend_Form
$this->clients = $clients;
return $this;
}
+ private $buttontext = 'Save';
+ function setButtontext($v){
+ $this->buttontext = $v;
+ }
}
diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php
index e8e99a5..9a9570c 100644
--- a/application/modules/user/forms/RoleAdd.php
+++ b/application/modules/user/forms/RoleAdd.php
@@ -22,15 +22,32 @@ class user_Form_RoleAdd extends Zend_Form
'label' => 'Title:',
));
- $this->addElement('text', 'description', array(
+ $this->addElement('text', 'title', array(
'filters' => array('StringTrim'),
'validators' => array(
- array('StringLength', false, array(0, 140)),
+ array('StringLength', false, array(0, 50)),
),
'required' => false,
- 'label' => 'Description:',
+ 'label' => 'Title:',
));
+ $sform = new Zend_Form_SubForm(array('legend' => 'Rights:'));
+ if(count($this->rightlist) > 0) {
+ foreach($this->rightlist as $rightcategory => $rights) {
+ foreach($rights as $rightID => $rightTitle) {
+ $element = $this->createElement('checkbox', "$rightID", array(
+ 'label' => $rightTitle . ':',
+ 'belongsTo' => 'rights',
+ ));
+ $elements[] = $rightID;
+ $sform->addElement($element);
+ }
+ $sform->addDisplayGroup($elements, "$rightcategory", array("legend" => $rightcategory . ":"));
+ unset($elements);
+ }
+ }
+ $this->addSubForm($sform, 'rights');
+
$this->addElement('checkbox', 'inheritance', array(
'label' => 'Inheritance:',
));