Skip to content

Commit 5ddbd26

Browse files
committed
Hide DisableDelete warning when creating a new topic
There's no sense in warning that the current topic can't be deleted when it hasn't even yet been created. This is relevant for new topics of protected types, such as containers.
1 parent 9beeb8a commit 5ddbd26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div id="FormArea" class="row form area">
2121

2222
<div class="col-md-12">
23-
@if (Model.ContentTypeDescriptor.DisableDelete) {
23+
@if (Model.ContentTypeDescriptor.DisableDelete && !Model.IsNew) {
2424
<div class="alert alert-warning" role="alert">
2525
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
2626
<strong>Warning:</strong> This topic is part of the OnTopic internal organizational structure and is not intended to be modified. Deletion of this Topic has been disabled.

0 commit comments

Comments
 (0)