Added a check for the runtime mode and showed the relevant error message if

This commit is contained in:
Paul Seal
2024-03-07 15:44:39 +00:00
committed by Busra Sengul
parent 3344274616
commit 7813acfa2b
2 changed files with 3 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ function contentCreateController($scope,
function initialize() {
$scope.loading = true;
$scope.allowedTypes = null;
$scope.runtimeModeProduction = Umbraco.Sys.ServerVariables.application.runtimeMode == 'Production';
var getAllowedTypes = contentTypeResource.getAllowedTypes($scope.currentNode.id).then(function (data) {
$scope.allowedTypes = iconHelper.formatContentTypeIcons(data);

View File

@@ -9,10 +9,10 @@
<h5 ng-show="selectBlueprint"><localize key="blueprints_selectBlueprint">Select a blueprint</localize></h5>
<div ng-if="allowedTypes && allowedTypes.length === 0">
<p class="abstract" ng-if="!hasSettingsAccess">
<p class="abstract" ng-if="!hasSettingsAccess || runtimeModeProduction">
<localize key="create_noDocumentTypesWithNoSettingsAccess">The selected page in the content tree doesn't allow for any pages to be created below it.</localize>
</p>
<div ng-if="hasSettingsAccess && currentNode.id >= 0">
<div ng-if="hasSettingsAccess && currentNode.id >= 0 && !runtimeModeProduction">
<p class="abstract">
<localize key="create_noDocumentTypes">There are no allowed Document Types available for creating content here. You must enable these in <strong>Document
Types</strong> within the <strong>Settings</strong> section, by editing the <strong>Allowed child node