Fixes manage form so widgets fileupload can work correctly inside

This commit is contained in:
Sam Georges 2014-09-16 17:40:06 +10:00
parent aa7e1800a4
commit 001a9f92ff
2 changed files with 12 additions and 9 deletions

View File

@ -462,7 +462,7 @@ class RelationController extends ControllerBehavior
$this->beforeAjax();
$saveData = $this->manageWidget->getSaveData();
$this->relationObject->find($this->manageId)->save($saveData);
$this->relationObject->find($this->manageId)->save($saveData, $this->relationGetSessionKey());
return ['#'.$this->relationGetId('view') => $this->relationRenderView()];
}

View File

@ -1,9 +1,11 @@
<?php if ($relationManageId): ?>
<?= Form::ajax('onRelationManageUpdate', [
'data' => ['_relation_field' => $relationField, 'manage_id' => $relationManageId],
'data-stripe-load-indicator' => true
]) ?>
<?= Form::ajax('onRelationManageUpdate', ['data-stripe-load-indicator' => true]) ?>
<!-- Passable fields -->
<input type="hidden" name="_relation_field" value="<?= $relationField ?>" />
<input type="hidden" name="manage_id" value="<?= $relationManageId ?>" />
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">
@ -33,10 +35,11 @@
<?php else: ?>
<?= Form::ajax('onRelationManageCreate', [
'data' => ['_relation_field' => $relationField],
'data-stripe-load-indicator' => true
]) ?>
<?= Form::ajax('onRelationManageCreate', ['data-stripe-load-indicator' => true]) ?>
<!-- Passable fields -->
<input type="hidden" name="_relation_field" value="<?= $relationField ?>" />
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">