From b67d56804c08e92b70bb4a48ca0fd9a3c034bdfa Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Mon, 8 Jun 2020 22:28:10 +0200 Subject: [PATCH] Ensure primary button style for save-button in content template create view --- .../directives/components/content/edit.controller.js | 8 +++++++- .../src/views/components/content/edit.html | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index c07bb9bc83..4f3e02a8c9 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -270,9 +270,15 @@ * @param {any} app the active content app */ function createButtons(content) { + + var isBlueprint = content.isBlueprint; + + if ($scope.page.isNew && $location.path().search(/contentBlueprints/i) !== -1) { + isBlueprint = true; + } // for trashed and element type items, the save button is the primary action - otherwise it's a secondary action - $scope.page.saveButtonStyle = content.trashed || content.isElement || content.isBlueprint ? "primary" : "info"; + $scope.page.saveButtonStyle = content.trashed || content.isElement || isBlueprint ? "primary" : "info"; // only create the save/publish/preview buttons if the // content app is "Conent" if ($scope.activeApp && $scope.activeApp.alias !== "umbContent" && $scope.activeApp.alias !== "umbInfo" && $scope.activeApp.alias !== "umbListView") { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html index 0772dea148..b0548e403c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html @@ -14,8 +14,7 @@ on-select-app="appChanged(app)" on-select-app-anchor="appAnchorChanged(app, anchor)" on-back="onBack()" - show-back="!(infiniteModel && infiniteModel.infiniteMode)" - > + show-back="!(infiniteModel && infiniteModel.infiniteMode)">