[icinga-checkins] icinga.org: icingaweb2-module-director/bugfix/loop-templateresolver-11803: DirectorObjectForm: deal with subform values

git at icinga.org git at icinga.org
Mon Oct 31 13:31:46 CET 2016


Module: icingaweb2-module-director
Branch: bugfix/loop-templateresolver-11803
Commit: 78b01091eb1bc29c713eb3e448e004a2471f388e
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=78b01091eb1bc29c713eb3e448e004a2471f388e

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Oct 27 19:39:40 2016 +0000

DirectorObjectForm: deal with subform values

---

 library/Director/Web/Form/DirectorObjectForm.php |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php
index 5f05048..1a621d6 100644
--- a/library/Director/Web/Form/DirectorObjectForm.php
+++ b/library/Director/Web/Form/DirectorObjectForm.php
@@ -576,8 +576,12 @@ abstract class DirectorObjectForm extends QuickForm
 
             foreach ($post as $key => $value) {
                 $el = $this->getElement($key);
-                if ($el && ! $el->getIgnore()) {
-                    $values[$key] = $el->setValue($value)->getValue();
+                if ($el) {
+                    if (! $el->getIgnore()) {
+                        $values[$key] = $el->setValue($value)->getValue();
+                    }
+                } elseif ($sub = $this->getSubForm($key)) {
+                    $values[$key] = $sub->populate($value)->getValues();
                 }
             }
         }



More information about the icinga-checkins mailing list