117 lines
3.3 KiB
HTML
117 lines
3.3 KiB
HTML
{% extends 'dashboard/domain_detail/base.html' %}
|
|
|
|
{% set domain_detail_page = "info" %}
|
|
|
|
{% block title %}
|
|
{{ custom_domain.domain }} Info
|
|
{% endblock %}
|
|
|
|
{% block domain_detail_content %}
|
|
<h1 class="h3"> {{ custom_domain.domain }}
|
|
{% if custom_domain.verified %}
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="DNS Setup OK">✅</span>
|
|
{% else %}
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="DNS Setup Needed">
|
|
<a href="{{ url_for('dashboard.domain_detail_dns', custom_domain_id=custom_domain.id) }}"
|
|
class="text-decoration-none">🚫
|
|
</a>
|
|
</span>
|
|
{% endif %}
|
|
</h1>
|
|
|
|
<div class="small-text">Created {{ custom_domain.created_at | dt }}</div>
|
|
|
|
{{ nb_alias }} aliases
|
|
|
|
<hr>
|
|
<div>Catch All</div>
|
|
<div class="small-text">
|
|
This feature allows you to create aliases <b>on the fly</b>.
|
|
Simply use <em>anything@{{ custom_domain.domain }}</em>
|
|
next time you need an email address. <br>
|
|
The alias will be created the first time it receives an email.
|
|
</div>
|
|
|
|
<div>
|
|
<form method="post">
|
|
<input type="hidden" name="form-name" value="switch-catch-all">
|
|
<label class="custom-switch cursor mt-2 pl-0"
|
|
data-toggle="tooltip"
|
|
{% if custom_domain.catch_all %}
|
|
title="Disable catch-all"
|
|
{% else %}
|
|
title="Enable catch-all"
|
|
{% endif %}
|
|
>
|
|
<input type="checkbox" class="custom-switch-input"
|
|
{{ "checked" if custom_domain.catch_all else "" }}>
|
|
|
|
<span class="custom-switch-indicator"></span>
|
|
</label>
|
|
</form>
|
|
</div>
|
|
|
|
<hr>
|
|
<div>Default Alias name</div>
|
|
<div class="small-text">
|
|
This name will be used as the default alias name when you send
|
|
or reply from an alias, unless overwritten by the alias specific name.
|
|
</div>
|
|
|
|
<div>
|
|
<form method="post">
|
|
<input type="hidden" name="form-name" value="set-name">
|
|
<div class="form-group">
|
|
<input class="form-control"
|
|
value="{{ custom_domain.name or "" }}"
|
|
name="alias-name"
|
|
placeholder="Alias name">
|
|
</div>
|
|
<button class="btn btn-primary">Save</a>
|
|
</form>
|
|
</div>
|
|
|
|
<hr>
|
|
<h3 class="mb-0">Delete Domain</h3>
|
|
<div class="small-text mb-3">Please note that this operation is irreversible.
|
|
All aliases associated with this domain will be also deleted.
|
|
</div>
|
|
|
|
<form method="post">
|
|
<input type="hidden" name="form-name" value="delete">
|
|
<span class="delete-custom-domain btn btn-outline-danger">Delete domain</span>
|
|
</form>
|
|
|
|
{% endblock %}
|
|
|
|
{% block script %}
|
|
<script>
|
|
$(".custom-switch-input").change(function (e) {
|
|
$(this).closest("form").submit();
|
|
});
|
|
|
|
$(".delete-custom-domain").on("click", function (e) {
|
|
let that = $(this);
|
|
|
|
bootbox.confirm({
|
|
message: "All aliases associated with <b>{{ custom_domain.domain }}</b> will be also deleted, " +
|
|
" please confirm.",
|
|
buttons: {
|
|
confirm: {
|
|
label: 'Yes, delete it',
|
|
className: 'btn-danger'
|
|
},
|
|
cancel: {
|
|
label: 'Cancel',
|
|
className: 'btn-outline-primary'
|
|
}
|
|
},
|
|
callback: function (result) {
|
|
if (result) {
|
|
that.closest("form").submit();
|
|
}
|
|
}
|
|
})
|
|
});
|
|
</script>
|
|
{% endblock %} |