Removing "hard-delete" option for now.

This commit is contained in:
Sipke Schoorstra
2014-10-28 13:37:06 -07:00
parent a0c5f59b58
commit c21c8098fe
2 changed files with 7 additions and 11 deletions

View File

@@ -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;
}
}
};

View File

@@ -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">