2019-12-30 16:52:08 +00:00
|
|
|
{% extends 'dashboard/domain_detail/base.html' %}
|
|
|
|
|
|
|
|
{% set domain_detail_page = "info" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ custom_domain.domain }} Info
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block domain_detail_content %}
|
2021-09-17 09:38:07 +00:00
|
|
|
<h1 class="h2 mb-1"> {{ custom_domain.domain }} </h1>
|
2019-12-30 16:52:08 +00:00
|
|
|
|
2021-09-17 09:38:07 +00:00
|
|
|
<div class="small-text">Created {{ custom_domain.created_at | dt }}. {{ nb_alias }} aliases</div>
|
2019-12-30 16:52:08 +00:00
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
<hr>
|
2021-09-17 15:41:36 +00:00
|
|
|
<h3 class="mb-1">Auto create/on the fly alias </h3>
|
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="switch-catch-all">
|
2021-09-17 15:41:36 +00:00
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
<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>
|
2021-09-17 15:41:36 +00:00
|
|
|
<spam class="ml-2">
|
|
|
|
Catch All
|
|
|
|
</spam>
|
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
</label>
|
|
|
|
</form>
|
2021-09-17 15:41:36 +00:00
|
|
|
<div class="">
|
|
|
|
Simply use <b>anything@{{ custom_domain.domain }}</b>
|
|
|
|
next time you need an alias: it'll be <b>automatically</b>
|
|
|
|
created the first time it receives an email.
|
2021-09-20 16:28:43 +00:00
|
|
|
To have more fine-grained control, you can also define
|
|
|
|
<a href="{{ url_for('dashboard.domain_detail_auto_create', custom_domain_id=custom_domain.id) }}">auto create
|
|
|
|
rules
|
|
|
|
<i class="fe fe-chevrons-right"></i></a>.
|
2021-09-17 15:41:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
</div>
|
|
|
|
|
2021-09-20 16:28:43 +00:00
|
|
|
<div class="{% if not custom_domain.catch_all %} disabled-content {% endif %}">
|
|
|
|
<div>Auto-created aliases are automatically owned by the following mailboxes
|
|
|
|
<i class="fe fe-corner-right-down"></i></a>.
|
|
|
|
</div>
|
2021-09-17 09:54:37 +00:00
|
|
|
{% set domain_mailboxes=custom_domain.mailboxes %}
|
|
|
|
<form method="post" class="mt-2">
|
|
|
|
<input type="hidden" name="form-name" value="update">
|
|
|
|
<input type="hidden" name="domain-id" value="{{ custom_domain.id }}">
|
|
|
|
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="flex-grow-1 mr-2">
|
|
|
|
<select data-width="100%" required
|
|
|
|
class="mailbox-select" multiple name="mailbox_ids">
|
|
|
|
{% for mailbox in mailboxes %}
|
|
|
|
<option value="{{ mailbox.id }}" {% if mailbox in domain_mailboxes %}
|
|
|
|
selected {% endif %}>
|
|
|
|
{{ mailbox.email }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button class="btn btn-outline-primary btn-sm">Update</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2020-05-03 14:05:34 +00:00
|
|
|
<hr>
|
2021-09-17 09:38:07 +00:00
|
|
|
<h3 class="mb-1">Default Display Name</h3>
|
|
|
|
<div class="">
|
|
|
|
Default display name for aliases created with <b>{{ custom_domain.domain }}</b>
|
2021-09-17 09:54:37 +00:00
|
|
|
unless overwritten by the alias display name.
|
2020-05-03 14:05:34 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2021-09-17 09:38:07 +00:00
|
|
|
<form method="post" class="form-inline">
|
2020-05-03 14:05:34 +00:00
|
|
|
<input type="hidden" name="form-name" value="set-name">
|
|
|
|
<div class="form-group">
|
2021-09-17 09:38:07 +00:00
|
|
|
<input class="form-control mr-2"
|
2020-05-03 14:05:34 +00:00
|
|
|
value="{{ custom_domain.name or "" }}"
|
|
|
|
name="alias-name"
|
2021-09-17 09:38:07 +00:00
|
|
|
placeholder="Alias Display Name">
|
2020-05-03 14:05:34 +00:00
|
|
|
</div>
|
2021-09-17 09:38:07 +00:00
|
|
|
<button class="btn btn-outline-primary" name="action" value="save">Save</button>
|
2020-11-24 11:02:47 +00:00
|
|
|
{% if custom_domain.name %}
|
2021-09-17 09:38:07 +00:00
|
|
|
<button class="btn btn-outline-danger float-right ml-2" name="action" value="remove">Remove</button>
|
2020-11-24 11:02:47 +00:00
|
|
|
{% endif %}
|
2020-05-03 14:05:34 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2020-10-09 20:54:13 +00:00
|
|
|
<hr>
|
2021-09-17 09:38:07 +00:00
|
|
|
<h3 class="mb-1">Random Prefix Generation</h3>
|
|
|
|
<div class="">
|
|
|
|
Add a random prefix for this domain when creating a new alias.
|
2020-10-09 20:54:13 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="switch-random-prefix-generation">
|
|
|
|
<label class="custom-switch cursor mt-2 pl-0"
|
|
|
|
data-toggle="tooltip"
|
|
|
|
{% if custom_domain.random_prefix_generation %}
|
|
|
|
title="Disable random prefix generation"
|
|
|
|
{% else %}
|
|
|
|
title="Enable random prefix generation"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
<input type="checkbox" class="custom-switch-input"
|
|
|
|
{{ "checked" if custom_domain.random_prefix_generation else "" }}>
|
|
|
|
|
|
|
|
<span class="custom-switch-indicator"></span>
|
|
|
|
</label>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2019-12-30 17:51:55 +00:00
|
|
|
<hr>
|
2021-11-18 09:33:15 +00:00
|
|
|
<h3 class="mb-1">
|
|
|
|
{% if custom_domain.is_sl_subdomain %}
|
|
|
|
Delete Subdomain
|
|
|
|
{% else %}
|
|
|
|
Delete Domain
|
|
|
|
{% endif %}
|
|
|
|
</h3>
|
|
|
|
|
2021-09-17 09:38:07 +00:00
|
|
|
<div class="mb-3">This operation is <b>irreversible</b>.
|
|
|
|
All aliases associated with this domain will be deleted.
|
2021-11-18 09:33:15 +00:00
|
|
|
{% if custom_domain.is_sl_subdomain %}
|
|
|
|
<br>
|
|
|
|
After deletion, your subdomain quota will be {{ current_user.subdomain_quota - 1 }}.
|
|
|
|
{% endif %}
|
2019-12-30 17:51:55 +00:00
|
|
|
</div>
|
|
|
|
|
2021-11-18 09:33:15 +00:00
|
|
|
|
|
|
|
|
2019-12-30 17:51:55 +00:00
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="form-name" value="delete">
|
2021-09-17 09:38:07 +00:00
|
|
|
<span class="delete-custom-domain btn btn-danger">Delete domain</span>
|
2019-12-30 17:51:55 +00:00
|
|
|
</form>
|
|
|
|
|
2019-12-30 16:52:08 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
{% block script %}
|
|
|
|
<script>
|
2021-09-17 09:54:37 +00:00
|
|
|
$('.mailbox-select').multipleSelect();
|
|
|
|
|
2019-12-30 17:20:49 +00:00
|
|
|
$(".custom-switch-input").change(function (e) {
|
|
|
|
$(this).closest("form").submit();
|
2019-12-30 17:51:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$(".delete-custom-domain").on("click", function (e) {
|
2020-04-30 20:37:39 +00:00
|
|
|
let that = $(this);
|
|
|
|
|
|
|
|
bootbox.confirm({
|
2020-11-12 16:41:47 +00:00
|
|
|
message: "All aliases associated with <b>{{ custom_domain.domain }}</b> will be also deleted. <br>" +
|
|
|
|
"This operation is not reversible, please confirm.",
|
2020-04-30 20:37:39 +00:00
|
|
|
buttons: {
|
|
|
|
confirm: {
|
|
|
|
label: 'Yes, delete it',
|
|
|
|
className: 'btn-danger'
|
|
|
|
},
|
|
|
|
cancel: {
|
|
|
|
label: 'Cancel',
|
|
|
|
className: 'btn-outline-primary'
|
|
|
|
}
|
2019-12-30 17:51:55 +00:00
|
|
|
},
|
2020-04-30 20:37:39 +00:00
|
|
|
callback: function (result) {
|
|
|
|
if (result) {
|
|
|
|
that.closest("form").submit();
|
|
|
|
}
|
2019-12-30 17:51:55 +00:00
|
|
|
}
|
2020-04-30 20:37:39 +00:00
|
|
|
})
|
2019-12-30 17:51:55 +00:00
|
|
|
});
|
2019-12-30 17:20:49 +00:00
|
|
|
</script>
|
2020-10-09 20:54:13 +00:00
|
|
|
{% endblock %}
|
2021-09-17 09:54:37 +00:00
|
|
|
|