Make JS aware of password verification
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
ccf3e4255a
commit
a0c64044b2
2 changed files with 9 additions and 0 deletions
|
@ -672,6 +672,7 @@ class UsersController extends Controller {
|
|||
* @todo merge into saveUserSettings
|
||||
*
|
||||
* @NoAdminRequired
|
||||
* @PasswordConfirmationRequired
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $displayName
|
||||
|
|
|
@ -90,10 +90,18 @@
|
|||
_onInputChanged: function(e) {
|
||||
var self = this;
|
||||
|
||||
var $dialog = $('.oc-dialog:visible');
|
||||
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
|
||||
if($dialog.length === 0) {
|
||||
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this._onInputChanged, this, e));
|
||||
}
|
||||
return;
|
||||
}
|
||||
var $target = $(e.target);
|
||||
var value = $target.val();
|
||||
var field = $target.attr('id');
|
||||
this._config.set(field, value);
|
||||
|
||||
var savingData = this._config.save({
|
||||
error: function(jqXHR) {
|
||||
OC.msg.finishedSaving('#personal-settings-container .msg', jqXHR);
|
||||
|
|
Loading…
Reference in a new issue