SyncpropertyController: set SyncRule for our form

This commit is contained in:
Thomas Gelf 2015-11-02 09:32:38 +01:00
parent a971063ea1
commit defec84ba2
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Objects\SyncRule;
class SyncpropertyController extends ActionController
{
@ -44,6 +45,9 @@ class SyncpropertyController extends ActionController
if ($edit) {
$form->loadObject($id);
$form->setRule(SyncRule::load($form->getObject()->rule_id, $this->db()));
} elseif ($rule_id = $this->params->get('rule_id')) {
$form->setRule(SyncRule::load($rule_id, $this->db()));
}
$form->handleRequest();