File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed
src/OrchardCore.Modules/OrchardCore.ContentTypes Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -545,7 +545,6 @@ public async Task<ActionResult> EditPart(string id)
545
545
}
546
546
547
547
[ HttpPost , ActionName ( "EditPart" ) ]
548
- [ FormValueRequired ( "submit.Save" ) ]
549
548
public async Task < ActionResult > EditPartPOST ( string id , string [ ] orderedFieldNames )
550
549
{
551
550
if ( ! await _authorizationService . AuthorizeAsync ( User , ContentTypesPermissions . EditContentTypes ) )
Original file line number Diff line number Diff line change 55
55
56
56
<zone Name =" Title" ><h1 >@RenderTitleSegments(T ["Edit Content Type - { 0 } ", Model.TypeDefinition.DisplayName])</h1 ></zone >
57
57
58
- <form asp-action = " Edit " >
58
+ <form method = " post " >
59
59
@Html.ValidationSummary()
60
60
61
61
<input type =" hidden" asp-for =" Name" />
184
184
</div >
185
185
186
186
<div class =" mb-3" >
187
- <a class =" btn btn-secondary" asp-route-action =" List" >@T ["Cancel"]</a >
188
187
<div class =" btn-group" >
189
- <button class =" btn btn-success save" type =" submit" name =" submit.Save" value =" Save" >@T ["Save"]</button >
188
+ <button asp-route-action = " Edit " class =" btn btn-success save" type =" submit" name =" submit.Save" value =" Save" >@T ["Save"]</button >
190
189
<button type =" button" class =" btn btn-success dropdown-toggle dropdown-toggle-split" data-reference =" parent" data-bs-toggle =" dropdown" aria-haspopup =" true" aria-expanded =" false" >
191
190
<span class =" visually-hidden" >@T ["Toggle Dropdown"]</span >
192
191
</button >
193
192
<div class =" dropdown-menu" >
194
- <button class =" dropdown-item save-continue" type =" submit" name =" submit.Save" value =" SaveAndContinue" >@T ["and continue"]</button >
193
+ <button asp-route-action = " Edit " class =" dropdown-item save-continue" type =" submit" name =" submit.Save" value =" SaveAndContinue" >@T ["and continue"]</button >
195
194
</div >
196
195
</div >
196
+ @if (contentSettings .IsSystemDefined )
197
+ {
198
+ <div class =" d-inline" data-bs-toggle =" tooltip" data-bs-title =" @T[" System-defined types are integral components of the system and cannot be removed. " ]" >
199
+ <button type =" button" class =" btn btn-danger" disabled >
200
+ @T ["Delete "]
201
+ </button >
202
+ </div >
203
+ }
204
+ else
205
+ {
206
+ <a role =" button" asp-route-action =" Delete" asp-route-id =" @Model.Name" class =" btn btn-danger" data-url-af =" RemoveUrl UnsafeUrl" data-title =" @T[" Delete " ]" data-message =" @T[" Are you sure you want to delete this content type? " ]" data-ok-text =" @T[" Ok " ]" data-cancel-text =" @T[" Cancel " ]" >@T ["Delete "]</a >
207
+ }
208
+ <a class =" btn btn-secondary cancel" role =" button" asp-route-action =" List" >@T ["Cancel"]</a >
197
209
</div >
198
210
</form >
199
211
<script asp-name =" Sortable" at =" Foot" ></script >
Original file line number Diff line number Diff line change 76
76
}
77
77
}
78
78
<div class =" mb-3" >
79
- <a class =" btn btn-secondary" asp-route-action =" ListParts" >@T ["Cancel"]</a >
80
79
<button class =" btn btn-primary save" type =" submit" name =" submit.Save" value =" Save" >@T ["Save"]</button >
80
+ <a role =" button" asp-route-action =" DeletePart" asp-route-id =" @Model.Name" class =" btn btn-danger" data-url-af =" RemoveUrl UnsafeUrl" data-title =" @T[" Delete " ]" data-message =" @T[" Are you sure you want to delete this content part? " ]" data-ok-text =" @T[" Ok " ]" data-cancel-text =" @T[" Cancel " ]" >@T ["Delete"]</a >
81
+ <a class =" btn btn-secondary cancel" role =" button" asp-route-action =" ListParts" >@T ["Cancel"]</a >
81
82
</div >
82
83
</form >
83
84
<script asp-name =" Sortable" at =" Foot" ></script >
You can’t perform that action at this time.
0 commit comments