mirror of https://github.com/tp4a/teleport
temp.
parent
99529630c6
commit
39ced04d25
|
@ -987,6 +987,7 @@ $app.create_dlg_reset_password = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
dlg.do_send_reset_email = function () {
|
dlg.do_send_reset_email = function () {
|
||||||
|
dlg.dom.btn_send_reset_email.attr('disabled', 'disabled');
|
||||||
$tp.ajax_post_json('/user/reset-password', {
|
$tp.ajax_post_json('/user/reset-password', {
|
||||||
id: dlg.field_id,
|
id: dlg.field_id,
|
||||||
mode: 1,
|
mode: 1,
|
||||||
|
@ -994,15 +995,16 @@ $app.create_dlg_reset_password = function () {
|
||||||
password: ''
|
password: ''
|
||||||
},
|
},
|
||||||
function (ret) {
|
function (ret) {
|
||||||
|
dlg.dom.btn_send_reset_email.removeAttr('disabled');
|
||||||
if (ret.code === TPE_OK) {
|
if (ret.code === TPE_OK) {
|
||||||
$tp.notify_success('用户密码重置成功!');
|
$tp.notify_success('用户密码重置成功!');
|
||||||
// $app.table_users.load_data();
|
|
||||||
dlg.dom.dialog.modal('hide');
|
dlg.dom.dialog.modal('hide');
|
||||||
} else {
|
} else {
|
||||||
$tp.notify_error('用户密码重置失败:' + tp_error_msg(ret.code, ret.message));
|
$tp.notify_error('用户密码重置失败:' + tp_error_msg(ret.code, ret.message));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
function () {
|
function () {
|
||||||
|
dlg.dom.btn_send_reset_email.removeAttr('disabled');
|
||||||
$tp.notify_error('网络故障,用户密码重置失败!');
|
$tp.notify_error('网络故障,用户密码重置失败!');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue