Enable dynamic form elements

Expire time of the AcknowledgeForm and hours as well as
minutes of the ScheduleDowntimeForm are now dynamic.

refs #4439
This commit is contained in:
Johannes Meyer 2013-08-02 16:55:28 +02:00 committed by Jannis Moßhammer
parent f5162189dd
commit 66592ecabf
3 changed files with 16 additions and 2 deletions

View File

@ -365,12 +365,10 @@ abstract class Form extends Zend_Form
if ($this->getElement($this->tokenElementName) === null) {
return false;
}
if (strpos($elementValue, '|') === false) {
return false;
}
list($seed, $token) = explode('|', $elementValue);
if (!is_numeric($seed)) {

View File

@ -39,6 +39,14 @@ use Icinga\Protocol\Commandpipe\Comment;
*/
class AcknowledgeForm extends CommandForm
{
/**
* Initialize form
*/
public function init()
{
$this->setName('AcknowledgeForm');
}
/**
* Interface method to build the form
* @see CommandForm::create

View File

@ -58,6 +58,14 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
*/
const TYPE_FLEXIBLE = 'flexible';
/**
* Initialize form
*/
public function init()
{
$this->setName('ScheduleDowntimeForm');
}
/**
* Build an array of timestamps
*