summaryrefslogtreecommitdiff
path: root/manager/application
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2010-06-28 20:06:01 +0200
committerMichael Tänzer <neo@nhng.de>2010-06-28 20:06:01 +0200
commit2c75cddc50c838ddf530e4170612e32050a131f7 (patch)
treed95828e1ba5be0b035fde7d01f6917dd98f82c5a /manager/application
parent2905cc65984aa757227ff8d3dcfd6b83759dec67 (diff)
downloadcacert-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/application')
-rw-r--r--manager/application/controllers/ManageAccountController.php42
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);
+ }
}