2019-12-02 01:13:39 +01:00
|
|
|
{% extends 'default.html' %}
|
2019-12-29 11:03:47 +01:00
|
|
|
{% set active_page = "custom_domain" %}
|
2019-12-02 01:13:39 +01:00
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Custom Domains
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block default_content %}
|
|
|
|
<div class="row">
|
2020-04-05 19:59:48 +02:00
|
|
|
<div class="col">
|
2019-12-02 01:13:39 +01:00
|
|
|
<h1 class="h3"> Custom Domains </h1>
|
|
|
|
|
2020-01-16 22:21:19 +01:00
|
|
|
{% if not current_user.is_premium() %}
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
This feature is only available in premium plan.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-01-20 11:16:04 +01:00
|
|
|
<div class="alert alert-primary" role="alert">
|
|
|
|
If you own a domain, let's say <b>example.com</b>, you will be able to create aliases with this domain, for example
|
|
|
|
contact@example.com, help@example.com, etc with SimpleLogin. <br>
|
|
|
|
You could also enable <b>catch-all</b> feature that allows you to create aliases on-the-fly.
|
|
|
|
</div>
|
|
|
|
|
2019-12-02 01:13:39 +01:00
|
|
|
{% for custom_domain in custom_domains %}
|
2020-04-05 19:59:48 +02:00
|
|
|
<div class="card" style="">
|
2019-12-02 01:13:39 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">
|
2019-12-28 21:59:47 +01:00
|
|
|
<a href="{{ url_for('dashboard.domain_detail', custom_domain_id=custom_domain.id) }}">{{ custom_domain.domain }}</a>
|
|
|
|
{% if custom_domain.verified %}
|
|
|
|
<span class="cursor" data-toggle="tooltip" data-original-title="Domain Verified">✅</span>
|
|
|
|
{% else %}
|
2020-01-07 21:53:00 +01:00
|
|
|
<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>
|
2019-12-28 21:59:47 +01:00
|
|
|
{% endif %}
|
2019-12-02 01:13:39 +01:00
|
|
|
</h5>
|
2019-12-02 01:33:49 +01:00
|
|
|
<h6 class="card-subtitle mb-2 text-muted">
|
|
|
|
Created {{ custom_domain.created_at | dt }} <br>
|
|
|
|
<span class="font-weight-bold">{{ custom_domain.nb_alias() }}</span> aliases.
|
|
|
|
</h6>
|
2019-12-02 01:13:39 +01:00
|
|
|
|
2019-12-27 23:50:09 +01:00
|
|
|
<a href="{{ url_for('dashboard.domain_detail', custom_domain_id=custom_domain.id) }}">Details ➡</a>
|
2019-12-02 01:13:39 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
{{ new_custom_domain_form.csrf_token }}
|
|
|
|
<input type="hidden" name="form-name" value="create">
|
|
|
|
|
|
|
|
<label class="form-label">Domain</label>
|
|
|
|
<small>Please use full path domain, for ex <em>my-subdomain.my-domain.com</em></small>
|
|
|
|
|
|
|
|
{{ new_custom_domain_form.domain(class="form-control", placeholder="my-domain.com") }}
|
|
|
|
{{ render_field_errors(new_custom_domain_form.domain) }}
|
|
|
|
<button class="btn btn-lg btn-success mt-2">Create</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block script %}
|
|
|
|
<script>
|
|
|
|
$(".delete-custom-domain").on("click", function (e) {
|
|
|
|
notie.confirm({
|
|
|
|
text: "All aliases associated with this domain will be also deleted, " +
|
2019-12-22 16:59:41 +01:00
|
|
|
" please confirm.",
|
2019-12-02 01:13:39 +01:00
|
|
|
cancelCallback: () => {
|
|
|
|
// nothing to do
|
|
|
|
},
|
|
|
|
submitCallback: () => {
|
|
|
|
$(this).closest("form").submit();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|