mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
FormExtensibleSet: fix add button
This commit is contained in:
parent
fda920d3ad
commit
6105ae4386
@ -138,7 +138,9 @@ class Zend_View_Helper_FormExtensibleSet extends Zend_View_Helper_FormElement
|
|||||||
. $disabled
|
. $disabled
|
||||||
. $this->_htmlAttribs($attribs)
|
. $this->_htmlAttribs($attribs)
|
||||||
. $this->getClosingBracket()
|
. $this->getClosingBracket()
|
||||||
|
. '<span class="inline-buttons">'
|
||||||
. $this->renderAddButton($name, $disabled)
|
. $this->renderAddButton($name, $disabled)
|
||||||
|
. '</span>'
|
||||||
. '</li>';
|
. '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,9 +209,9 @@ class Zend_View_Helper_FormExtensibleSet extends Zend_View_Helper_FormElement
|
|||||||
$v = $this->view;
|
$v = $this->view;
|
||||||
|
|
||||||
return '<input type="submit" class="related-action action-add"'
|
return '<input type="submit" class="related-action action-add"'
|
||||||
. ' name="' . $name . '_ADD"'
|
. ' name="' . $name . '___ADD"'
|
||||||
. ' value=""'
|
. ' value=""'
|
||||||
. ' title="' . $v->translate('Remove this entry') . '"'
|
. ' title="' . $v->translate('Add a new entry') . '"'
|
||||||
. $disabled
|
. $disabled
|
||||||
. ' />';
|
. ' />';
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,10 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
|
|
||||||
if (substr($key, 0, 4) === 'var_') {
|
if (substr($key, 0, 4) === 'var_') {
|
||||||
|
if (substr($key, -6) === '___ADD') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$mykey = substr($key, 4);
|
$mykey = substr($key, 4);
|
||||||
if (property_exists($fields, $mykey) && $fields->$mykey->format === 'json') {
|
if (property_exists($fields, $mykey) && $fields->$mykey->format === 'json') {
|
||||||
$value = json_decode($value);
|
$value = json_decode($value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user