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:
parent
f5162189dd
commit
66592ecabf
|
@ -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)) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue