remove "trigger-email"
This commit is contained in:
parent
af431c3d8b
commit
bbcd4fc355
|
@ -225,7 +225,8 @@
|
|||
<select id="mailbox-{{ alias.id }}"
|
||||
class="form-control form-control-sm custom-select" name="mailbox">
|
||||
{% for mailbox in mailboxes %}
|
||||
<option value="{{ mailbox.id }}" {% if mailbox.id == alias_info.mailbox.id %} selected {% endif %}>
|
||||
<option value="{{ mailbox.id }}" {% if mailbox.id == alias_info.mailbox.id %}
|
||||
selected {% endif %}>
|
||||
{{ mailbox.email }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
@ -409,19 +410,6 @@
|
|||
});
|
||||
});
|
||||
|
||||
$(".trigger-email").on("click", function (e) {
|
||||
notie.confirm({
|
||||
text: "SimpleLogin server will send an email to this alias " +
|
||||
"and it will arrive to your inbox, please confirm.",
|
||||
cancelCallback: () => {
|
||||
// nothing to do
|
||||
},
|
||||
submitCallback: () => {
|
||||
$(this).closest("form").submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".custom-switch-input").change(async function (e) {
|
||||
let aliasId = $(this).data("alias");
|
||||
let alias = $(this).parent().find(".alias").val();
|
||||
|
|
|
@ -33,19 +33,7 @@ def index():
|
|||
|
||||
# User generates a new email
|
||||
if request.method == "POST":
|
||||
if request.form.get("form-name") == "trigger-email":
|
||||
alias_id = request.form.get("alias-id")
|
||||
alias = Alias.get(alias_id)
|
||||
|
||||
LOG.d("trigger an email to %s", alias)
|
||||
email_utils.send_test_email_alias(alias.email, alias.user.name)
|
||||
|
||||
flash(
|
||||
f"An email sent to {alias.email} is on its way, please check your inbox/spam folder",
|
||||
"success",
|
||||
)
|
||||
|
||||
elif request.form.get("form-name") == "create-custom-email":
|
||||
if request.form.get("form-name") == "create-custom-email":
|
||||
if current_user.can_create_new_alias():
|
||||
return redirect(url_for("dashboard.custom_alias"))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue