summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms/RoleAdd.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/forms/RoleAdd.php')
-rw-r--r--application/modules/user/forms/RoleAdd.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php
new file mode 100644
index 0000000..3b5200b
--- /dev/null
+++ b/application/modules/user/forms/RoleAdd.php
@@ -0,0 +1,50 @@
+<?php
+
+class user_Form_RoleAdd extends Zend_Form
+{
+ private $rightlist;
+
+ public function setRightlist($rightlist){
+ $this->rightlist = $rightlist;
+ }
+
+ public function init()
+ {
+ $this->setName("RoleAdd");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $this->addElement('text', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Description:',
+ ));
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Add',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="/user/role/"',
+ ));
+ }
+
+
+}
+