aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/UserDialog.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-11 00:57:40 +1300
committerGitHub <noreply@github.com>2017-03-11 00:57:40 +1300
commitfffbc1700b4ca1c35109eddc40edbc994d01942a (patch)
treecd2221c24ff3ed7fc98f6ea9c740098431ed8055 /web/app/view/UserDialog.js
parentf9ffbdb72b00b157c0d66b46372f42f9a3ba0a18 (diff)
parent8a51bf453f9f7400744754d26231dae8077a4608 (diff)
downloadtrackermap-web-fffbc1700b4ca1c35109eddc40edbc994d01942a.tar.gz
trackermap-web-fffbc1700b4ca1c35109eddc40edbc994d01942a.tar.bz2
trackermap-web-fffbc1700b4ca1c35109eddc40edbc994d01942a.zip
Merge pull request #425 from Abyss777/group_user_fields
Group user fields in fieldsets
Diffstat (limited to 'web/app/view/UserDialog.js')
-rw-r--r--web/app/view/UserDialog.js292
1 files changed, 154 insertions, 138 deletions
diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js
index a024c856..5e4e00a8 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'
+ }
}
- }
+ }]
}]
},