diff options
Diffstat (limited to 'web/app/view/login')
-rw-r--r-- | web/app/view/login/Login.js | 3 | ||||
-rw-r--r-- | web/app/view/login/LoginController.js | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/web/app/view/login/Login.js b/web/app/view/login/Login.js index c56557186..6cfaa4645 100644 --- a/web/app/view/login/Login.js +++ b/web/app/view/login/Login.js @@ -58,7 +58,8 @@ Ext.define('Traccar.view.login.Login', { buttons: [{ text: strings.login_register, - handler: 'onRegisterClick' + handler: 'onRegisterClick', + reference: 'registerButton' }, { text: strings.login_login, handler: 'onLoginClick' diff --git a/web/app/view/login/LoginController.js b/web/app/view/login/LoginController.js index c22b0e09a..e94d0de9d 100644 --- a/web/app/view/login/LoginController.js +++ b/web/app/view/login/LoginController.js @@ -22,6 +22,12 @@ Ext.define('Traccar.view.login.LoginController', { 'Traccar.view.login.Register' ], + init: function() { + this.lookupReference('registerButton').setDisabled( + !Traccar.getApplication().getServer().get('registration') + ); + }, + onAfterRender: function(field) { field.focus(); }, |