aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/login
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-01 12:36:28 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-01 12:36:28 +1200
commitd310875d1bf13baa13daba2ec73107dbeaa397f7 (patch)
treec18e3b7de87bfb470d6d2de2203e4236657a173b /web/app/view/login
parentc91259f62618358ccf662a5d883f70df79ecbe65 (diff)
downloadtrackermap-server-d310875d1bf13baa13daba2ec73107dbeaa397f7.tar.gz
trackermap-server-d310875d1bf13baa13daba2ec73107dbeaa397f7.tar.bz2
trackermap-server-d310875d1bf13baa13daba2ec73107dbeaa397f7.zip
Load server settings in web
Diffstat (limited to 'web/app/view/login')
-rw-r--r--web/app/view/login/Login.js3
-rw-r--r--web/app/view/login/LoginController.js6
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();
},