Initial import of animal_management module
This commit is contained in:
34
views/animals/inline-edit-result.php
Normal file
34
views/animals/inline-edit-result.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var string $collapseId */
|
||||
/* @var array $refreshSelectors */
|
||||
|
||||
$payload = [
|
||||
'source' => 'animal-inline-editor',
|
||||
'type' => 'saved',
|
||||
'collapseId' => (string)$collapseId,
|
||||
'refreshSelectors' => array_values(array_map('strval', $refreshSelectors ?? [])),
|
||||
];
|
||||
|
||||
$jsonPayload = json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
?>
|
||||
|
||||
<div class="panel panel-success" style="margin:10px;">
|
||||
<div class="panel-body" style="padding:12px;">
|
||||
<?= Html::encode(Yii::t('AnimalManagementModule.base', 'Saved. Updating section...')) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->registerJs(<<<JS
|
||||
(function() {
|
||||
var payload = {$jsonPayload};
|
||||
if (window.parent && window.parent !== window) {
|
||||
window.parent.postMessage(payload, '*');
|
||||
}
|
||||
})();
|
||||
JS
|
||||
, \yii\web\View::POS_END);
|
||||
?>
|
||||
Reference in New Issue
Block a user