parent
7b8f17e6d1
commit
8eafcaa090
|
|
@ -1509,16 +1509,25 @@ class RelationController extends ControllerBehavior
|
|||
$field = $this->field;
|
||||
}
|
||||
|
||||
if (!$config || !isset($this->originalConfig->{$field})) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
!is_array($config) &&
|
||||
(!$config = @json_decode(@base64_decode($config), true))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$parsedConfig = array_only($config, ['readOnly']);
|
||||
$parsedConfig['view'] = array_only($config, ['recordUrl']);
|
||||
|
||||
if (is_array($config) && isset($this->originalConfig->{$field})) {
|
||||
$this->originalConfig->{$field} = array_merge_recursive(
|
||||
$this->originalConfig->{$field} = array_replace_recursive(
|
||||
$this->originalConfig->{$field},
|
||||
$parsedConfig
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the configuration for a mode (view, manage, pivot) for an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div
|
||||
id="<?= $this->relationGetId() ?>"
|
||||
data-request-data="_relation_field: '<?= $relationField ?>', _relation_extra_config: <?= e(json_encode($relationExtraConfig)) ?>"
|
||||
data-request-data="_relation_field: '<?= $relationField ?>', _relation_extra_config: '<?= e(base64_encode(json_encode($relationExtraConfig))) ?>'"
|
||||
class="relation-behavior relation-view-<?= $relationViewMode ?>">
|
||||
|
||||
<?php if ($toolbar = $this->relationRenderToolbar()): ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue