Fix account deletion form multiple password attempts

pull/1/head
yflory 4 years ago
parent 1f61dbcc02
commit 54fcd3cf13

@ -485,14 +485,15 @@ define([
var spinner = UI.makeSpinner($form); var spinner = UI.makeSpinner($form);
UI.confirmButton(button, { UI.confirmButton(button, {
classes: 'btn-danger' classes: 'btn-danger',
multiple: true
}, function() { }, function() {
$button.prop('disabled', 'disabled'); $button.prop('disabled', 'disabled');
spinner.spin();
var password = $form.find('#cp-settings-delete-account').val(); var password = $form.find('#cp-settings-delete-account').val();
if (!password) { if (!password) {
return void UI.warn(Messages.error); return void UI.warn(Messages.error);
} }
spinner.spin();
sframeChan.query("Q_SETTINGS_DELETE_ACCOUNT", { sframeChan.query("Q_SETTINGS_DELETE_ACCOUNT", {
password: password password: password
}, function(err, data) { }, function(err, data) {
@ -520,7 +521,7 @@ define([
h('pre', JSON.stringify(data, 0, 2)) h('pre', JSON.stringify(data, 0, 2))
]); ]);
UI.alert(msg); UI.alert(msg);
spinner.done(); spinner.hide();
$button.prop('disabled', ''); $button.prop('disabled', '');
}); });
}); });

Loading…
Cancel
Save