aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/UserDialogController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-20 09:25:32 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-20 09:25:32 +0500
commitb11bed89bf2ae1643965160fbb7fb2d183a3ff1f (patch)
tree197f33b5fb02ca42bbaa3a7d1acfc1eb563e4ab7 /web/app/view/UserDialogController.js
parentd8e0a38c6626b48f27ad9fc92afb6a548bdaa52a (diff)
downloadtrackermap-web-b11bed89bf2ae1643965160fbb7fb2d183a3ff1f.tar.gz
trackermap-web-b11bed89bf2ae1643965160fbb7fb2d183a3ff1f.tar.bz2
trackermap-web-b11bed89bf2ae1643965160fbb7fb2d183a3ff1f.zip
- Increase token length
- Make not editable - Add clear trigger
Diffstat (limited to 'web/app/view/UserDialogController.js')
-rw-r--r--web/app/view/UserDialogController.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js
index 020bd801..7dc1d889 100644
--- a/web/app/view/UserDialogController.js
+++ b/web/app/view/UserDialogController.js
@@ -35,13 +35,17 @@ Ext.define('Traccar.view.UserDialogController', {
generateToken: function () {
var i, newToken = '';
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 20; i++) {
newToken += this.symbols.charAt(Math.floor(Math.random() * this.symbols.length));
}
this.lookupReference('tokenField').setValue(newToken);
},
+ clearToken: function () {
+ this.lookupReference('tokenField').setValue('');
+ },
+
onSaveClick: function (button) {
var dialog, record, store;
dialog = button.up('window').down('form');