mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
c00ddea2fc
Added server-side logic for register.html validation Keep form firelds on register.html in the event of wrong input fields to save users from retyping info More button rounding
136 lines
4.3 KiB
HTML
136 lines
4.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% set active_page = "remove_domain" %}
|
|
|
|
{% block title %}
|
|
<title>
|
|
Remove Domain - {{ SITE_NAME }}
|
|
</title>
|
|
{% endblock %}
|
|
|
|
{% block dashboard_stat %}
|
|
<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>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-4">
|
|
<div class="card shadow card-outline card-secondary">
|
|
<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 />
|
|
</div>
|
|
<div class="card-footer">
|
|
<button type="button" class="btn btn-default" onclick="window.location.href='{{ url_for('dashboard.dashboard') }}'">
|
|
Cancel
|
|
</button>
|
|
<button type="button" class="btn btn-danger button_delete float-right">Remove</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="col-8">
|
|
<div class="card shadow card-outline card-secondary">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Help with removing a new domain</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<dl class="dl-horizontal">
|
|
<dt>Domain name</dt>
|
|
<dd>Select domain you wish to remove from DNS.</dd>
|
|
</dl>
|
|
<p>Find more details at <a href="https://docs.powerdns.com/md/">https://docs.powerdns.com/md/</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|
|
|
|
{% block extrascripts %}
|
|
<script>
|
|
// handle delete button
|
|
$(document.body).on("click", ".button_delete", function(e) {
|
|
e.stopPropagation();
|
|
if ( $("#domainid").val() == 0 ){
|
|
showErrorModal("Please select domain to remove.");
|
|
return;
|
|
}
|
|
|
|
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');
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block modals %}
|
|
<div class="modal fade modal-warning" id="modal_delete">
|
|
<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-default" id="button_delete_cancel" data-dismiss="modal">
|
|
Close
|
|
</button>
|
|
<button type="button" class="btn btn-danger float-right" id="button_delete_confirm">
|
|
Delete
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|