aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-08-03 07:58:53 +0300
committerninioe <ninioe@gmail.com>2016-08-03 07:58:53 +0300
commit6f32f4a9460ff3be2823d7a133659d29bf057237 (patch)
treebbc34326fe1c43e3a5eeefa6d351e13a4eeaf3bc /web/app
parent63e5690c22dc5911a8ec5cfe1b44c8a5a8576456 (diff)
downloadtrackermap-server-6f32f4a9460ff3be2823d7a133659d29bf057237.tar.gz
trackermap-server-6f32f4a9460ff3be2823d7a133659d29bf057237.tar.bz2
trackermap-server-6f32f4a9460ff3be2823d7a133659d29bf057237.zip
Rename references from txtXxx to xxxField
Diffstat (limited to 'web/app')
-rw-r--r--web/app/view/Login.js6
-rw-r--r--web/app/view/LoginController.js10
2 files changed, 8 insertions, 8 deletions
diff --git a/web/app/view/Login.js b/web/app/view/Login.js
index 4876e928c..259086854 100644
--- a/web/app/view/Login.js
+++ b/web/app/view/Login.js
@@ -54,7 +54,7 @@ Ext.define('Traccar.view.Login', {
}, {
xtype: 'textfield',
name: 'email',
- reference: 'txtUser',
+ reference: 'userField',
fieldLabel: Strings.userEmail,
allowBlank: false,
enableKeyEvents: true,
@@ -66,7 +66,7 @@ Ext.define('Traccar.view.Login', {
}, {
xtype: 'textfield',
name: 'password',
- reference: 'txtPassword',
+ reference: 'passwordField',
fieldLabel: Strings.userPassword,
inputType: 'password',
allowBlank: false,
@@ -77,7 +77,7 @@ Ext.define('Traccar.view.Login', {
inputAttrTpl: ['autocomplete="on"']
}, {
xtype: 'checkboxfield',
- reference: 'chkRememberMe',
+ reference: 'rememberMeField',
fieldLabel: Strings.rememberMe
}, {
xtype: 'component',
diff --git a/web/app/view/LoginController.js b/web/app/view/LoginController.js
index c33af328e..f78b1e560 100644
--- a/web/app/view/LoginController.js
+++ b/web/app/view/LoginController.js
@@ -29,8 +29,8 @@ Ext.define('Traccar.view.LoginController', {
var user = Ext.util.Cookies.get('user');
var pass = Ext.util.Cookies.get('pass');
if (user && pass) {
- this.lookupReference('txtUser').setValue(user);
- this.lookupReference('txtPassword').setValue(pass);
+ this.lookupReference('userField').setValue(user);
+ this.lookupReference('passwordField').setValue(pass);
this.login();
}
},
@@ -47,9 +47,9 @@ Ext.define('Traccar.view.LoginController', {
callback: function (options, success, response) {
Ext.getBody().unmask();
if (success) {
- if (this.lookupReference('chkRememberMe').getValue()) {
- Ext.util.Cookies.set('user', this.lookupReference('txtUser').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
- Ext.util.Cookies.set('pass', this.lookupReference('txtPassword').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
+ if (this.lookupReference('rememberMeField').getValue()) {
+ Ext.util.Cookies.set('user', this.lookupReference('userField').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
+ Ext.util.Cookies.set('pass', this.lookupReference('passwordField').getValue(), Ext.Date.add(new Date(), Ext.Date.YEAR, 1));
}
Traccar.app.setUser(Ext.decode(response.responseText));
this.fireViewEvent('login');