mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudStack UI - Domain page - Delete Domain dialog - add a checkbox "Force Delete" and if it's checked, UI calls "deleteDomain&cleanup=true" that will delete all child domains and all accounts under this domain.
This commit is contained in:
parent
d78616caa0
commit
770c5cd377
@ -1,5 +1,6 @@
|
||||
#New - Add all new parameters here.
|
||||
|
||||
force.delete=Force Delete
|
||||
force.delete.domain.warning=Warning: Choosing this option will delete all child domains and accounts under this domain.
|
||||
|
||||
|
||||
#Labels
|
||||
|
||||
@ -371,4 +371,25 @@ dictionary = {
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add Domain Dialog (end) -->
|
||||
<!-- Add Domain Dialog (end) -->
|
||||
|
||||
<!-- Confirm to delete domain (begin) -->
|
||||
<div id="dialog_confirmation_delete_domain" title='<fmt:message key="label.confirmation"/>' style="display: none">
|
||||
<p>
|
||||
<fmt:message key="message.action.delete.domain" />
|
||||
</p>
|
||||
<div class="dialog_formcontent" id="force_delete_domain_container" style="display:none">
|
||||
<form action="#" method="post" id="form_acquire">
|
||||
<ol>
|
||||
<li style="padding-top:10px">
|
||||
<input type="checkbox" class="checkbox" id="force_delete_domain" />
|
||||
<p style="color:red"><fmt:message key="force.delete" /></p>
|
||||
</li>
|
||||
<li>
|
||||
<p style="color:red"><fmt:message key="force.delete.domain.warning" /></p>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Confirm to delete domain (end) -->
|
||||
@ -107,12 +107,15 @@ function domainAccountJSONToTemplate(jsonObj, $template) {
|
||||
function afterLoadDomainJSP() {
|
||||
hideMiddleMenu();
|
||||
clearMiddleMenu();
|
||||
|
||||
|
||||
initDialog("dialog_confirmation_delete_domain");
|
||||
|
||||
if(isAdmin()) {
|
||||
var $topButtonContainer = clearButtonsOnTop();
|
||||
$("#top_buttons").appendTo($topButtonContainer);
|
||||
$("#top_buttons").find("#add_domain_button").show();
|
||||
initAddDomainDialog();
|
||||
initAddDomainDialog();
|
||||
$("#dialog_confirmation_delete_domain").find("#force_delete_domain_container").show();
|
||||
}
|
||||
|
||||
//switch between different tabs
|
||||
@ -672,12 +675,12 @@ function doDeleteDomain($actionLink, $detailsTab, $midmenuItem1) {
|
||||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
var id = jsonObj.id;
|
||||
|
||||
$("#dialog_confirmation")
|
||||
.text(dictionary["message.action.delete.domain"])
|
||||
$("#dialog_confirmation_delete_domain")
|
||||
.dialog('option', 'buttons', {
|
||||
"Confirm": function() {
|
||||
$(this).dialog("close");
|
||||
var apiCommand = "command=deleteDomain&id="+id;
|
||||
$(this).dialog("close");
|
||||
var isForced = $("#dialog_confirmation_delete_domain").find("#force_delete_domain").attr("checked").toString();
|
||||
var apiCommand = "command=deleteDomain&id="+id+"&cleanup="+isForced;
|
||||
doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $detailsTab);
|
||||
},
|
||||
"Cancel": function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user