Bootstrap->alert([ 'variant' => 'success', 'text' => __('This meta-template is already up-to-date!'), 'dismissible' => false, ]); $modalType = 'ok-only'; } else if (empty($templateOnDisk)) { $diskTemplateError = $templateStatus['error'] ?? __('Unknown'); $bodyHtml .= $this->Bootstrap->alert([ 'variant' => 'danger', 'html' => sprintf('%s %s
%s
', __('Could not get template on disk.'), __('Reason:'), h($diskTemplateError)), 'dismissible' => false, ]); $modalType = 'ok-only'; } else { if ($updateStatus['automatically-updateable']) { $bodyHtml .= $this->Bootstrap->alert([ 'variant' => 'success', 'html' => __('This meta-template can be updated to version {0} (current: {1}).', sprintf('%s', h($templateOnDisk['version'])), h($metaTemplate->version)), 'dismissible' => false, ]); $bodyHtml .= $this->Bootstrap->alert([ 'variant' => 'success', 'text' => __('All meta-fields will be migrated to the newest version.'), 'dismissible' => false, ]); $form = $this->element('genericElements/Form/genericForm', [ 'entity' => null, 'ajax' => false, 'raw' => true, 'data' => [ 'model' => 'MetaTemplate', 'fields' => [ [ 'field' => 'update_strategy', 'type' => 'checkbox', 'value' => MetaTemplatesTable::UPDATE_STRATEGY_UPDATE_EXISTING, 'checked' => true, ], ], 'submit' => [ 'action' => $this->request->getParam('action') ], ] ]); $bodyHtml .= sprintf('