webui: fixed showing of success message after password change on login

similar issue and cause as in https://fedorahosted.org/freeipa/ticket/5567

root cause is that binding triggers validation which clears messages in
validation summary. Maybe it could be refactored in a future to not use
 the same validation summary field for API calls and fields.

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
Petr Vobornik
2016-02-23 10:18:35 +01:00
parent 31f42bc2e1
commit b9c27b6722
@@ -262,7 +262,6 @@ define(['dojo/_base/declare',
otp);
if (result.status === 'ok') {
val_summary.add_success('login', this.password_change_complete);
psw_f.set_value('');
psw_f2.set_value('');
// do not login if otp is used because it will fail (reuse of OTP)
@@ -270,6 +269,7 @@ define(['dojo/_base/declare',
psw_f.set_value(new_f.get_value());
this.login();
}
val_summary.add_success('login', this.password_change_complete);
this.set('view', 'login');
} else {
otp_f.set_value('');