mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 22:21:38 +08:00
do not ask for confirmation when enable/disable alias
This commit is contained in:
parent
ba105f076e
commit
7d35baddd4
1 changed files with 1 additions and 20 deletions
|
@ -379,26 +379,7 @@
|
|||
});
|
||||
|
||||
$(".custom-switch-input").change(function (e) {
|
||||
var message = "";
|
||||
let alias = $(this).parent().find(".alias").val();
|
||||
|
||||
if (e.target.checked) {
|
||||
message = `After this, you will start receiving email sent to <b>${alias}</b>, please confirm.`;
|
||||
} else {
|
||||
message = `After this, you will stop receiving email sent to <b>${alias}</b>, please confirm.`;
|
||||
}
|
||||
|
||||
notie.confirm({
|
||||
text: message,
|
||||
cancelCallback: () => {
|
||||
// reset to the original value
|
||||
var oldValue = !$(this).prop("checked");
|
||||
$(this).prop("checked", oldValue);
|
||||
},
|
||||
submitCallback: () => {
|
||||
$(this).closest("form").submit();
|
||||
}
|
||||
});
|
||||
$(this).closest("form").submit();
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue