add confirmation to detail editing
This commit is contained in:
parent
dc2a475af1
commit
f12e4e11b0
1 changed files with 20 additions and 1 deletions
|
@ -6,8 +6,27 @@
|
||||||
<p>Alter the details of your account, leave fields blank to leave them unchanged.</p>
|
<p>Alter the details of your account, leave fields blank to leave them unchanged.</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
<script>
|
||||||
|
function updateSettingsConfirm(form, action) {
|
||||||
|
var dialogue = new Sakura.Dialogue;
|
||||||
|
dialogue.Text = "Are you sure?";
|
||||||
|
dialogue.SetType(Sakura.DialogueType.Confirm);
|
||||||
|
dialogue.AddCallback(Sakura.DialogueButton.No, function () {
|
||||||
|
this.Close();
|
||||||
|
});
|
||||||
|
dialogue.AddCallback(Sakura.DialogueButton.Yes, function () {
|
||||||
|
updateSettings(form, action);
|
||||||
|
this.Close();
|
||||||
|
});
|
||||||
|
dialogue.Display();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block settingsContent %}
|
{% block settingsContent %}
|
||||||
<form enctype="multipart/form-data" method="post" action="javascript:;" onsubmit="updateSettings(this, '{{ route('settings.account.details') }}');">
|
<form enctype="multipart/form-data" method="post" action="javascript:;" onsubmit="updateSettingsConfirm(this, '{{ route('settings.account.details') }}');">
|
||||||
{% if edit_email %}
|
{% if edit_email %}
|
||||||
<div class="profile-field">
|
<div class="profile-field">
|
||||||
<div><h2>E-mail address</h2></div>
|
<div><h2>E-mail address</h2></div>
|
||||||
|
|
Reference in a new issue