diff options
author | Michael Tänzer <neo@nhng.de> | 2010-06-28 20:06:01 +0200 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2010-06-28 20:06:01 +0200 |
commit | 2c75cddc50c838ddf530e4170612e32050a131f7 (patch) | |
tree | d95828e1ba5be0b035fde7d01f6917dd98f82c5a /manager | |
parent | 2905cc65984aa757227ff8d3dcfd6b83759dec67 (diff) | |
download | cacert-mgr-2c75cddc50c838ddf530e4170612e32050a131f7.tar.gz cacert-mgr-2c75cddc50c838ddf530e4170612e32050a131f7.tar.xz cacert-mgr-2c75cddc50c838ddf530e4170612e32050a131f7.zip |
Add a form for the administrative increase feature
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'manager')
-rw-r--r-- | manager/application/controllers/ManageAccountController.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/manager/application/controllers/ManageAccountController.php b/manager/application/controllers/ManageAccountController.php index 361ab5f..e9d214c 100644 --- a/manager/application/controllers/ManageAccountController.php +++ b/manager/application/controllers/ManageAccountController.php @@ -166,4 +166,46 @@ class ManageAccountController extends Zend_Controller_Action return $form; } + + protected function getAdminIncreaseForm() + { + $form = new Zend_Form(); + $form->setAction('/manage-account/admin-increase')->setMethod('post'); + + $quantity = new Zend_Form_Element_Text('quantity'); + $quantity->setRequired(true) + ->setLabel(I18n::_('Number of Points')) + ->addFilter(new Zend_Filter_Int()) + ->addValidator(new Zend_Validate_GreaterThan(0)); + $form->addElement($quantity); + + $fragment = new Zend_Form_Element_Checkbox('fragment'); + $fragment->setLabel(I18n::_('Split into 2-Point Fragments')) + ->setChecked(true); + $form->addElement($fragment); + + $unlimited = new Zend_Form_Element_Checkbox('unlimited'); + $unlimited->setLabel(I18n::_('Assign Points even if the Limit of 150 '. + 'is exceeded')) + ->setChecked(false); + $form->addElement($unlimited); + + $location = new Zend_Form_Element_Text('location'); + $location->setRequired(true) + ->setLabel(I18n::_('Location')) + ->setValue(I18n::_('CAcert Test Manager')) + ->addValidator(new Zend_Validate_StringLength(1,255)); + $form->addElement($location); + + $date = new Zend_Form_Element_Text('date'); + $date->setRequired(true) + ->setLabel(I18n::_('Date of Increase')) + ->setValue(date('Y-m-d H:i:s')) + ->addValidator(new Zend_Validate_StringLength(1,255)); + $form->addElement($date); + + $submit = new Zend_Form_Element_Submit('submit'); + $submit->setLabel(I18n::_('Give Me Points')); + $form->addElement($submit); + } } |