diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-06-24 15:31:48 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@owncloud.com> | 2016-06-24 15:31:48 +0200 |
commit | 26aacb4e62cbd8f83f59ede459463a13a16eb319 (patch) | |
tree | 8beea5e8c1ec4185d20a285f66c88d3369a159fc /settings | |
parent | 04e3da0cf51f23b501eaef34e4be771b15c6e6d2 (diff) | |
download | nextcloud-server-26aacb4e62cbd8f83f59ede459463a13a16eb319.tar.gz nextcloud-server-26aacb4e62cbd8f83f59ede459463a13a16eb319.zip |
show which login name to use for the new app password
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 1 | ||||
-rw-r--r-- | settings/js/authtoken_view.js | 6 | ||||
-rw-r--r-- | settings/templates/personal.php | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index fba663b034d..db2db6e5bfc 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -118,6 +118,7 @@ class AuthSettingsController extends Controller { return [ 'token' => $token, + 'loginName' => $loginName, 'deviceToken' => $deviceToken ]; } diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index da5861689a0..cf6b4f7c8d4 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -107,6 +107,8 @@ _result: undefined, + _newAppLoginName: undefined, + _newAppPassword: undefined, _hideAppPasswordBtn: undefined, @@ -136,6 +138,7 @@ this._addAppPasswordBtn.click(_.bind(this._addAppPassword, this)); this._result = $('#app-password-result'); + this._newAppLoginName = $('#new-app-login-name'); this._newAppPassword = $('#new-app-password'); this._newAppPassword.on('focus', _.bind(this._onNewTokenFocus, this)); this._hideAppPasswordBtn = $('#app-password-hide'); @@ -181,6 +184,9 @@ $.when(creatingToken).done(function(resp) { _this.collection.add(resp.deviceToken); _this.render(); + _this._newAppLoginName.text(t('core', 'You may now configure your client with username "{loginName}" and the following password:', { + loginName: resp.loginName + })); _this._newAppPassword.val(resp.token); _this._toggleFormResult(false); _this._newAppPassword.select(); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index b9b8429d943..19a9968cec7 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -203,6 +203,7 @@ if($_['passwordChangeSupported']) { <button id="add-app-password" class="button"><?php p($l->t('Create new app password')); ?></button> </div> <div id="app-password-result" class="hidden"> + <span id="new-app-login-name"></span> <input id="new-app-password" type="text" readonly="readonly"/> <button id="app-password-hide" class="button"><?php p($l->t('Done')); ?></button> </div> |