Docker remove confirm button

pull/1/head
riley 1 year ago
parent 06d7012394
commit 8e421f5d55

@ -18,6 +18,12 @@ if self.task_start_failed then
<%+cbi/map%> <%+cbi/map%>
<div id="customModal" class="alert-message warning" style="display:none;">
"This will permanently delete your installation, are you sure?"
<a href="javascript:void(0)" onclick="proceedRemoval()">Yes</a> /
<a href="javascript:void(0)" onclick="closeRemoveConfirmation()">No</a>
</div>
<div class="cbi-page-actions control-group"> <div class="cbi-page-actions control-group">
<% <%
if not task_running then if not task_running then
@ -41,7 +47,7 @@ if self.task_start_failed then
else else
%> %>
<input class="btn cbi-button cbi-button-apply" type="button" value="<%:Start%>" onclick="cbi_submit(this, 'cbi.apply', 'start')" /> <input class="btn cbi-button cbi-button-apply" type="button" value="<%:Start%>" onclick="cbi_submit(this, 'cbi.apply', 'start')" />
<input class="btn cbi-button cbi-button-remove" type="button" value="<%:Remove%>" onclick="cbi_submit(this, 'cbi.apply', 'rm')" /> <input class="btn cbi-button cbi-button-remove" type="button" value="<%:Remove%>" onclick="showRemoveConfirmation()" />
<% <%
end end
else else
@ -57,6 +63,21 @@ if self.task_start_failed then
%> %>
</div> </div>
<script>
function showRemoveConfirmation() {
document.getElementById("customModal").style.display = "block";
}
function closeRemoveConfirmation() {
document.getElementById("customModal").style.display = "none";
}
function proceedRemoval() {
closeRemoveConfirmation();
cbi_submit(document.querySelector('.cbi-button-remove'), 'cbi.apply', 'rm');
}
</script>
<%+tasks/embed%> <%+tasks/embed%>
<% <%

Loading…
Cancel
Save