Skip to content
Permalink
Browse files

Fixed #2859

  • Loading branch information...
brandonkelly committed May 9, 2018
1 parent c6dae23 commit 46f1989739b5159a6a67362a14c9914f7e992275
@@ -7,6 +7,7 @@
- Fixed a bug where it was not possible to upload new assets to an entry and keep the existing assets at the same time.
- Fixed a bug where SVG files that were using single quotes instead of double quotes would not be recognized as such.
- Fixed a bug where translated versions of the “It looks like someone is currently performing a system update.” message contained an HTML-encoded `<br/>` tag.
- Fixed a bug where changing an entry’s type could skip adding the new entry type’s tabs, if the previous entry type didn’t have any tabs. ([#2859](https://github.com/craftcms/cms/issues/2859))

## 3.0.6 - 2018-05-08

@@ -400,7 +400,7 @@ public function actionSwitchEntryType(): Response
$this->_prepEditEntryVariables($variables);
$view = $this->getView();
$tabsHtml = $view->renderTemplate('_includes/tabs', $variables);
$tabsHtml = !empty($variables['tabs']) ? $view->renderTemplate('_includes/tabs', $variables) : null;
$fieldsHtml = $view->renderTemplate('entries/_fields', $variables);
$headHtml = $view->getHeadHtml();
$bodyHtml = $view->getBodyHtml();
@@ -20,7 +20,13 @@
this.$spinner.addClass('hidden');

if (textStatus === 'success') {
$('#tabs').replaceWith(response.tabsHtml);
var $tabs = $('#tabs');
if ($tabs.length) {
$tabs.replaceWith(response.tabsHtml);
} else {
$(response.tabsHtml).insertBefore($('#content'))
}

Craft.cp.initTabs();

$('#fields').html(response.fieldsHtml);

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

0 comments on commit 46f1989

Please sign in to comment.
You can’t perform that action at this time.