Trigger the change.oc.formwidget event on update of records through relationcontroller. (#4673)

Fixes #4625. Credit to @danielbidala for the initial report and proposed fix.
This commit is contained in:
Luke Towers 2019-10-08 17:30:02 -06:00 committed by GitHub
parent 773f266373
commit 06ba8c712f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
<div id="<?= $relationManageWidget->getId('managePopup') ?>">
<?php if ($relationManageId): ?>
<?= Form::ajax('onRelationManageUpdate', ['data-popup-load-indicator' => true, 'sessionKey' => $newSessionKey]) ?>
<?= Form::ajax('onRelationManageUpdate', [
'data-popup-load-indicator' => true,
'sessionKey' => $newSessionKey,
'data-request-success' => "$.oc.relationBehavior.changed('" . e($this->vars['relationField']) . "', 'updated')",
]) ?>
<!-- Passable fields -->
<input type="hidden" name="manage_id" value="<?= $relationManageId ?>" />