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) {
|
if ($this->getElement($this->tokenElementName) === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($elementValue, '|') === false) {
|
if (strpos($elementValue, '|') === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
list($seed, $token) = explode('|', $elementValue);
|
list($seed, $token) = explode('|', $elementValue);
|
||||||
|
|
||||||
if (!is_numeric($seed)) {
|
if (!is_numeric($seed)) {
|
||||||
|
|
|
@ -39,6 +39,14 @@ use Icinga\Protocol\Commandpipe\Comment;
|
||||||
*/
|
*/
|
||||||
class AcknowledgeForm extends CommandForm
|
class AcknowledgeForm extends CommandForm
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Initialize form
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->setName('AcknowledgeForm');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface method to build the form
|
* Interface method to build the form
|
||||||
* @see CommandForm::create
|
* @see CommandForm::create
|
||||||
|
|
|
@ -58,6 +58,14 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
|
||||||
*/
|
*/
|
||||||
const TYPE_FLEXIBLE = 'flexible';
|
const TYPE_FLEXIBLE = 'flexible';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize form
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->setName('ScheduleDowntimeForm');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build an array of timestamps
|
* Build an array of timestamps
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue