2021-10-30 19:21:45 +00:00
|
|
|
{% extends "base.html" %}
|
2023-02-18 16:04:14 +00:00
|
|
|
|
2021-10-30 19:21:45 +00:00
|
|
|
{% set active_page = "remove_domain" %}
|
2023-02-18 16:04:14 +00:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
<title>
|
|
|
|
Remove Domain - {{ SITE_NAME }}
|
|
|
|
</title>
|
|
|
|
{% endblock %}
|
2021-10-30 19:21:45 +00:00
|
|
|
|
|
|
|
{% block dashboard_stat %}
|
2023-02-18 16:04:14 +00:00
|
|
|
<div class="content-header">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<h1 class="m-0 text-dark">
|
|
|
|
Domain
|
|
|
|
<small>Remove</small>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Dashboard</a></li>
|
|
|
|
<li class="breadcrumb-item active">Domain - Remove Domain</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<section class="content">
|
2023-02-18 16:04:14 +00:00
|
|
|
<div class="container-fluid">
|
2021-10-30 19:21:45 +00:00
|
|
|
<div class="row">
|
2023-02-18 16:04:14 +00:00
|
|
|
<div class="col-4">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Remove Domain</h3>
|
|
|
|
</div>
|
|
|
|
<form role="form" method="post" action="{{ url_for('domain.remove') }}">
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
|
|
|
|
<div class="card-body">
|
|
|
|
<select id=domainid class="form-control" style="width:15em;">
|
|
|
|
<option value="0">- Select Domain -</option>
|
|
|
|
{% for domain in domainss %}
|
|
|
|
<option value="{{ domain.id }}">{{ domain.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<br />
|
2021-10-30 19:21:45 +00:00
|
|
|
</div>
|
2023-02-18 16:04:14 +00:00
|
|
|
<div class="card-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
|
|
|
|
<i class="fa-solid fa-window-close"></i> Cancel
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-danger button_delete float-right">
|
|
|
|
<i class="fa-solid fa-trash-alt"></i> Remove
|
|
|
|
</button>
|
2023-02-18 14:04:37 +00:00
|
|
|
</div>
|
2023-02-18 16:04:14 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Help with removing a domain</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<dl class="dl-horizontal">
|
|
|
|
<dt>Domain Name</dt>
|
|
|
|
<dd>Select the domain you wish to remove from the system.</dd>
|
|
|
|
</dl>
|
|
|
|
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a></p>
|
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
</div>
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
</div>
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
</section>
|
|
|
|
{% endblock %}
|
2023-02-18 16:04:14 +00:00
|
|
|
|
2021-10-30 19:21:45 +00:00
|
|
|
{% block extrascripts %}
|
|
|
|
<script>
|
2023-02-18 16:04:14 +00:00
|
|
|
// handle delete button
|
|
|
|
$(document.body).on("click", ".button_delete", function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
if ( $("#domainid").val() == 0 ){
|
|
|
|
showErrorModal("Please select domain to remove.");
|
|
|
|
return;
|
|
|
|
}
|
2021-10-30 19:21:45 +00:00
|
|
|
|
2023-02-18 16:04:14 +00:00
|
|
|
var modal = $("#modal_delete");
|
|
|
|
var domain = $("#domainid option:selected").text();
|
|
|
|
var info = "Are you sure you want to delete " + domain + "?";
|
|
|
|
modal.find('.modal-body p').text(info);
|
|
|
|
modal.find('#button_delete_confirm').click(function () {
|
|
|
|
$.post($SCRIPT_ROOT + '/domain/remove' , {
|
|
|
|
'_csrf_token': '{{ csrf_token() }}',
|
|
|
|
'domainid': domain,
|
|
|
|
}, function () {
|
|
|
|
window.location.href = '{{ url_for('dashboard.dashboard') }}';
|
|
|
|
});
|
|
|
|
modal.modal('hide');
|
|
|
|
})
|
|
|
|
modal.modal('show');
|
|
|
|
$("#button_delete_cancel").unbind().one('click', function(e) {
|
|
|
|
modal.modal('hide');
|
2021-10-30 19:21:45 +00:00
|
|
|
});
|
2023-02-18 16:04:14 +00:00
|
|
|
});
|
2021-10-30 19:21:45 +00:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block modals %}
|
|
|
|
<div class="modal fade modal-warning" id="modal_delete">
|
2023-02-18 16:04:14 +00:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title">Confirmation</h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" id="button_delete_cancel" data-dismiss="modal">
|
|
|
|
<i class="fa-solid fa-window-close"></i> Cancel
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
|
|
|
|
<i class="fa-solid fa-trash-alt"></i> Remove
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
</div>
|
2023-02-18 16:04:14 +00:00
|
|
|
</div>
|
2021-10-30 19:21:45 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|