mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Removing "hard-delete" option for now.
This commit is contained in:
@@ -3,17 +3,12 @@
|
||||
var executeSelectedAction = function(e, form) {
|
||||
var actionList = form.find("[name=\"RecycleBinCommand\"]");
|
||||
var selectedAction = actionList.find("option:selected");
|
||||
var prompts = selectedAction.data("unsafe-action");
|
||||
var prompt = selectedAction.data("unsafe-action");
|
||||
|
||||
if (prompts) {
|
||||
if (!Array.isArray(prompts))
|
||||
prompts = [prompts];
|
||||
|
||||
for (var i = 0; i < prompts.length; i++) {
|
||||
if (!confirm(prompts[i])) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (prompt) {
|
||||
if (!confirm(prompt)) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -21,7 +21,8 @@
|
||||
<select name="RecycleBinCommand">
|
||||
<option></option>
|
||||
<option value="@RecycleBinCommand.Restore" data-unsafe-action="@T("Are you sure you want to restore the selected items?")" @if(Model.RecycleBinCommand == RecycleBinCommand.Restore){<text>selected="selected"</text>}>@T("Restore")</option>
|
||||
<option value="@RecycleBinCommand.Destroy" data-unsafe-action='["@T("WARNING: This will PERMANENTLY delete the selected content items, including related content part records, never to be seen again. Are you really absolutely sure you want to do this?")", "@T("Are you sure? You will not be able to restore permanenly deleted items. You should seriously consider making a DB backup first. This is your last chance to back out my friend. Are you sure you wish to proceed?")"]' @if (Model.RecycleBinCommand == RecycleBinCommand.Destroy) { <text> selected="selected" </text> }>@T("Remove Permanently ☠")</option>
|
||||
@**TODO: Decide wether or not to allow users to permanently delete items. Commented out for now.*@
|
||||
@*<option value="@RecycleBinCommand.Destroy" data-unsafe-action="@T("WARNING: This will PERMANENTLY delete the selected content items, including related content part records, never to be seen again. Are you sure you want to do this?")" @if (Model.RecycleBinCommand == RecycleBinCommand.Destroy) { <text> selected="selected" </text> }>@T("Remove Permanently ☠")</option>*@
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-control-group">
|
||||
|
Reference in New Issue
Block a user