aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-10 13:42:53 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-10 16:27:36 +0500
commit8a51bf453f9f7400744754d26231dae8077a4608 (patch)
tree2eb0c5ccebff115ee90fe81884e8797cc8755c34
parent2e76f6cb4487a1efd3fbe168e6168f9ed5c2df47 (diff)
downloadetbsa-traccar-web-8a51bf453f9f7400744754d26231dae8077a4608.tar.gz
etbsa-traccar-web-8a51bf453f9f7400744754d26231dae8077a4608.tar.bz2
etbsa-traccar-web-8a51bf453f9f7400744754d26231dae8077a4608.zip
Group user fields in fieldsets
-rw-r--r--web/app/view/BaseDialog.js1
-rw-r--r--web/app/view/UserDialog.js292
-rw-r--r--web/l10n/en.json3
3 files changed, 158 insertions, 138 deletions
diff --git a/web/app/view/BaseDialog.js b/web/app/view/BaseDialog.js
index 7526348..aa9782f 100644
--- a/web/app/view/BaseDialog.js
+++ b/web/app/view/BaseDialog.js
@@ -22,6 +22,7 @@ Ext.define('Traccar.view.BaseDialog', {
resizable: false,
modal: true,
autoScroll: true,
+ constrain: true,
initComponent: function () {
if (window.innerHeight) {
diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js
index 84103ee..f051088 100644
--- a/web/app/view/UserDialog.js
+++ b/web/app/view/UserDialog.js
@@ -28,145 +28,161 @@ Ext.define('Traccar.view.UserDialog', {
items: {
xtype: 'form',
items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: Strings.sharedName
- }, {
- xtype: 'textfield',
- name: 'email',
- fieldLabel: Strings.userEmail,
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'password',
- fieldLabel: Strings.userPassword,
- inputType: 'password',
- allowBlank: false
- }, {
- xtype: 'textfield',
- name: 'phone',
- fieldLabel: Strings.sharedPhone
- }, {
- xtype: 'checkboxfield',
- inputValue: true,
- uncheckedValue: false,
- name: 'readonly',
- fieldLabel: Strings.serverReadonly,
- allowBlank: false,
- hidden: true,
- reference: 'readonlyField'
- }, {
- xtype: 'checkboxfield',
- inputValue: true,
- uncheckedValue: false,
- name: 'admin',
- fieldLabel: Strings.userAdmin,
- allowBlank: false,
- hidden: true,
- reference: 'adminField'
- }, {
- xtype: 'combobox',
- name: 'map',
- fieldLabel: Strings.mapLayer,
- store: 'MapTypes',
- displayField: 'name',
- valueField: 'key',
- editable: false
- }, {
- xtype: 'combobox',
- name: 'distanceUnit',
- fieldLabel: Strings.sharedDistance,
- store: 'DistanceUnits',
- displayField: 'name',
- valueField: 'key',
- editable: false
- }, {
- xtype: 'combobox',
- name: 'speedUnit',
- fieldLabel: Strings.settingsSpeedUnit,
- store: 'SpeedUnits',
- displayField: 'name',
- valueField: 'key',
- editable: false
- }, {
- xtype: 'numberfield',
- reference: 'latitude',
- name: 'latitude',
- fieldLabel: Strings.positionLatitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- reference: 'longitude',
- name: 'longitude',
- fieldLabel: Strings.positionLongitude,
- decimalPrecision: Traccar.Style.coordinatePrecision
- }, {
- xtype: 'numberfield',
- reference: 'zoom',
- name: 'zoom',
- fieldLabel: Strings.serverZoom
- }, {
- xtype: 'checkboxfield',
- inputValue: true,
- uncheckedValue: false,
- name: 'twelveHourFormat',
- fieldLabel: Strings.settingsTwelveHourFormat,
- allowBlank: false
- }, {
- xtype: 'combobox',
- name: 'coordinateFormat',
- fieldLabel: Strings.settingsCoordinateFormat,
- store: 'CoordinateFormats',
- displayField: 'name',
- valueField: 'key',
- editable: false
- }, {
- xtype: 'checkboxfield',
- inputValue: true,
- uncheckedValue: false,
- name: 'disabled',
- fieldLabel: Strings.userDisabled,
- hidden: true,
- reference: 'disabledField'
- }, {
- xtype: 'datefield',
- name: 'expirationTime',
- fieldLabel: Strings.userExpirationTime,
- disabled: true,
- reference: 'expirationTimeField',
- startDay: Traccar.Style.weekStartDay,
- format: Traccar.Style.dateFormat
- }, {
- xtype: 'numberfield',
- name: 'deviceLimit',
- fieldLabel: Strings.userDeviceLimit,
- disabled: true,
- reference: 'deviceLimitField'
- }, {
- xtype: 'numberfield',
- name: 'userLimit',
- fieldLabel: Strings.userUserLimit,
- disabled: true,
- reference: 'userLimitField'
- }, {
- xtype: 'checkboxfield',
- inputValue: true,
- uncheckedValue: false,
- name: 'deviceReadonly',
- fieldLabel: Strings.userDeviceReadonly,
- disabled: true,
- reference: 'deviceReadonlyField'
- }, {
- xtype: 'textfield',
- name: 'token',
- reference: 'tokenField',
- fieldLabel: Strings.userToken,
- triggers: {
- generate: {
- cls: 'iconCls: x-fa fa-refresh',
- handler: 'generateToken'
+ xtype: 'fieldset',
+ title: Strings.sharedRequired,
+ items: [{
+ xtype: 'textfield',
+ name: 'name',
+ fieldLabel: Strings.sharedName
+ }, {
+ xtype: 'textfield',
+ name: 'email',
+ fieldLabel: Strings.userEmail,
+ allowBlank: false
+ }, {
+ xtype: 'textfield',
+ name: 'password',
+ fieldLabel: Strings.userPassword,
+ inputType: 'password',
+ allowBlank: false
+ }]
+ }, {
+ xtype: 'fieldset',
+ title: Strings.sharedPreferences,
+ collapsible: true,
+ collapsed: true,
+ items: [{
+ xtype: 'textfield',
+ name: 'phone',
+ fieldLabel: Strings.sharedPhone
+ }, {
+ xtype: 'combobox',
+ name: 'map',
+ fieldLabel: Strings.mapLayer,
+ store: 'MapTypes',
+ displayField: 'name',
+ valueField: 'key',
+ editable: false
+ }, {
+ xtype: 'combobox',
+ name: 'distanceUnit',
+ fieldLabel: Strings.sharedDistance,
+ store: 'DistanceUnits',
+ displayField: 'name',
+ valueField: 'key',
+ editable: false
+ }, {
+ xtype: 'combobox',
+ name: 'speedUnit',
+ fieldLabel: Strings.settingsSpeedUnit,
+ store: 'SpeedUnits',
+ displayField: 'name',
+ valueField: 'key',
+ editable: false
+ }, {
+ xtype: 'numberfield',
+ reference: 'latitude',
+ name: 'latitude',
+ fieldLabel: Strings.positionLatitude,
+ decimalPrecision: Traccar.Style.coordinatePrecision
+ }, {
+ xtype: 'numberfield',
+ reference: 'longitude',
+ name: 'longitude',
+ fieldLabel: Strings.positionLongitude,
+ decimalPrecision: Traccar.Style.coordinatePrecision
+ }, {
+ xtype: 'numberfield',
+ reference: 'zoom',
+ name: 'zoom',
+ fieldLabel: Strings.serverZoom
+ }, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'twelveHourFormat',
+ fieldLabel: Strings.settingsTwelveHourFormat,
+ allowBlank: false
+ }, {
+ xtype: 'combobox',
+ name: 'coordinateFormat',
+ fieldLabel: Strings.settingsCoordinateFormat,
+ store: 'CoordinateFormats',
+ displayField: 'name',
+ valueField: 'key',
+ editable: false
+ }]
+ }, {
+ xtype: 'fieldset',
+ title: Strings.sharedPermissions,
+ collapsible: true,
+ collapsed: true,
+ items: [{
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'disabled',
+ fieldLabel: Strings.userDisabled,
+ hidden: true,
+ reference: 'disabledField'
+ }, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'admin',
+ fieldLabel: Strings.userAdmin,
+ allowBlank: false,
+ hidden: true,
+ reference: 'adminField'
+ }, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'readonly',
+ fieldLabel: Strings.serverReadonly,
+ allowBlank: false,
+ hidden: true,
+ reference: 'readonlyField'
+ }, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'deviceReadonly',
+ fieldLabel: Strings.userDeviceReadonly,
+ disabled: true,
+ reference: 'deviceReadonlyField'
+ }, {
+ xtype: 'datefield',
+ name: 'expirationTime',
+ fieldLabel: Strings.userExpirationTime,
+ disabled: true,
+ reference: 'expirationTimeField',
+ startDay: Traccar.Style.weekStartDay,
+ format: Traccar.Style.dateFormat
+ }, {
+ xtype: 'numberfield',
+ name: 'deviceLimit',
+ fieldLabel: Strings.userDeviceLimit,
+ disabled: true,
+ reference: 'deviceLimitField'
+ }, {
+ xtype: 'numberfield',
+ name: 'userLimit',
+ fieldLabel: Strings.userUserLimit,
+ disabled: true,
+ reference: 'userLimitField'
+ }, {
+ xtype: 'textfield',
+ name: 'token',
+ reference: 'tokenField',
+ fieldLabel: Strings.userToken,
+ triggers: {
+ generate: {
+ cls: 'iconCls: x-fa fa-refresh',
+ handler: 'generateToken'
+ }
}
- }
+ }]
}]
},
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 222f388..cade524 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -47,6 +47,9 @@
"sharedFile": "File",
"sharedSelectFile": "Select File",
"sharedPhone": "Phone",
+ "sharedRequired": "Required",
+ "sharedPreferences": "Preferences",
+ "sharedPermissions": "Permissions",
"errorTitle": "Error",
"errorUnknown": "Unknown error",
"errorConnection": "Connection error",