From fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 14:36:35 +0100 Subject: format source files --- application/modules/user/forms/RoleEdit.php | 134 ++++++++++++++-------------- 1 file changed, 66 insertions(+), 68 deletions(-) (limited to 'application/modules/user/forms/RoleEdit.php') diff --git a/application/modules/user/forms/RoleEdit.php b/application/modules/user/forms/RoleEdit.php index 1505e78..68a740d 100644 --- a/application/modules/user/forms/RoleEdit.php +++ b/application/modules/user/forms/RoleEdit.php @@ -1,83 +1,81 @@ -roleID = $roleID; - } + public function setRoleID($roleID) { + $this->roleID = $roleID; + } - public function setInheritanceright($inheritanceright){ - $this->inheritanceright = $inheritanceright; - } + public function setInheritanceright($inheritanceright) { + $this->inheritanceright = $inheritanceright; + } - public function init() - { - $this->setName("RoleEdit"); - $this->setMethod('post'); + public function init() { + $this->setName("RoleEdit"); + $this->setMethod('post'); - $this->addElement('text', 'title', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'Title:', - 'value' => $_POST['title'], - )); + $this->addElement('text', 'title', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + 'value' => $_POST['title'], + )); - $this->addElement('text', 'description', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 140)), - ), - 'required' => false, - 'label' => 'Description:', - 'value' => $_POST['description'], - )); + $this->addElement('text', 'description', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 140)), + ), + 'required' => false, + 'label' => 'Description:', + 'value' => $_POST['description'], + )); - if($this->inheritanceright) { - if($_POST['inheritance'] == 1) { - $this->addElement('checkbox', 'inheritance', array( - 'label' => 'Inheritance:', - 'checked' => 'checked', - )); - } else { - $this->addElement('checkbox', 'inheritance', array( - 'label' => 'Inheritance:', - )); - } - } + if($this->inheritanceright) { + if($_POST['inheritance'] == 1) { + $this->addElement('checkbox', 'inheritance', array( + 'label' => 'Inheritance:', + 'checked' => 'checked', + )); + } else { + $this->addElement('checkbox', 'inheritance', array( + 'label' => 'Inheritance:', + )); + } + } - $this->addElement('hidden', 'groupID', array( - 'value' => $_POST['groupID'], - )); + $this->addElement('hidden', 'groupID', array( + 'value' => $_POST['groupID'], + )); - $this->addElement('submit', 'save', array( - 'required' => false, - 'ignore' => true, - 'label' => 'Save', - )); + $this->addElement('submit', 'save', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Save', + )); - $this->addElement('button', 'cancel', array( - 'required' => false, - 'ignore' => true, - 'label' => 'Cancel', - 'onclick' => 'location.href="javascript:history.back();"', - )); - } + $this->addElement('button', 'cancel', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Cancel', + 'onclick' => 'location.href="javascript:history.back();"', + )); + } } -- cgit v1.2.3-55-g7522