aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/attributes/useUserAttributes.js4
-rw-r--r--web/app/model/Server.js3
-rw-r--r--web/app/model/User.js3
-rw-r--r--web/app/store/CommonUserAttributes.js6
-rw-r--r--web/app/view/MainController.js4
-rw-r--r--web/app/view/dialog/Server.js6
-rw-r--r--web/app/view/dialog/User.js8
-rw-r--r--web/app/view/dialog/UserController.js1
-rw-r--r--web/app/view/map/MapController.js4
-rw-r--r--web/l10n/en.json2
10 files changed, 27 insertions, 14 deletions
diff --git a/modern/src/attributes/useUserAttributes.js b/modern/src/attributes/useUserAttributes.js
index 61c61899..0101d2f5 100644
--- a/modern/src/attributes/useUserAttributes.js
+++ b/modern/src/attributes/useUserAttributes.js
@@ -17,10 +17,6 @@ export default (t) => useMemo(() => ({
name: t('attributeWebMaxZoom'),
type: 'number',
},
- 'ui.disableReport': {
- name: t('attributeUiDisableReport'),
- type: 'boolean',
- },
'ui.disableEvents': {
name: t('attributeUiDisableEvents'),
type: 'boolean',
diff --git a/web/app/model/Server.js b/web/app/model/Server.js
index afafe908..177b4fc4 100644
--- a/web/app/model/Server.js
+++ b/web/app/model/Server.js
@@ -35,6 +35,9 @@ Ext.define('Traccar.model.Server', {
name: 'limitCommands',
type: 'boolean'
}, {
+ name: 'disableReports',
+ type: 'boolean'
+ }, {
name: 'map',
type: 'string'
}, {
diff --git a/web/app/model/User.js b/web/app/model/User.js
index 76f2a366..fcaff007 100644
--- a/web/app/model/User.js
+++ b/web/app/model/User.js
@@ -81,6 +81,9 @@ Ext.define('Traccar.model.User', {
name: 'limitCommands',
type: 'boolean'
}, {
+ name: 'disableReports',
+ type: 'boolean'
+ }, {
name: 'poiLayer',
type: 'string'
}, {
diff --git a/web/app/store/CommonUserAttributes.js b/web/app/store/CommonUserAttributes.js
index a8e92825..7d0ea969 100644
--- a/web/app/store/CommonUserAttributes.js
+++ b/web/app/store/CommonUserAttributes.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
@@ -39,10 +39,6 @@ Ext.define('Traccar.store.CommonUserAttributes', {
minValue: Traccar.Style.mapDefaultZoom,
maxValue: Traccar.Style.mapMaxZoom
}, {
- key: 'ui.disableReport',
- name: Strings.attributeUiDisableReport,
- valueType: 'boolean'
- }, {
key: 'ui.disableEvents',
name: Strings.attributeUiDisableEvents,
valueType: 'boolean'
diff --git a/web/app/view/MainController.js b/web/app/view/MainController.js
index 7cd03050..8ed986af 100644
--- a/web/app/view/MainController.js
+++ b/web/app/view/MainController.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@ Ext.define('Traccar.view.MainController', {
alias: 'controller.mainController',
init: function () {
- this.lookupReference('reportView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableReport'));
+ this.lookupReference('reportView').setHidden(Traccar.app.getPreference('disableReports', false));
this.lookupReference('eventsView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableEvents'));
}
});
diff --git a/web/app/view/dialog/Server.js b/web/app/view/dialog/Server.js
index d9e225ec..6ee250b6 100644
--- a/web/app/view/dialog/Server.js
+++ b/web/app/view/dialog/Server.js
@@ -122,6 +122,12 @@ Ext.define('Traccar.view.dialog.Server', {
uncheckedValue: false,
name: 'limitCommands',
fieldLabel: Strings.userLimitCommands
+ }, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'disableReports',
+ fieldLabel: Strings.userDisableReports
}]
}]
},
diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js
index 917f110c..7335ee79 100644
--- a/web/app/view/dialog/User.js
+++ b/web/app/view/dialog/User.js
@@ -145,6 +145,14 @@ Ext.define('Traccar.view.dialog.User', {
disabled: true,
reference: 'limitCommandsField'
}, {
+ xtype: 'checkboxfield',
+ inputValue: true,
+ uncheckedValue: false,
+ name: 'disableReports',
+ fieldLabel: Strings.userDisableReports,
+ disabled: true,
+ reference: 'disableReportsField'
+ }, {
xtype: 'datefield',
name: 'expirationTime',
fieldLabel: Strings.userExpirationTime,
diff --git a/web/app/view/dialog/UserController.js b/web/app/view/dialog/UserController.js
index 7383f9ee..4ba48563 100644
--- a/web/app/view/dialog/UserController.js
+++ b/web/app/view/dialog/UserController.js
@@ -31,6 +31,7 @@ Ext.define('Traccar.view.dialog.UserController', {
this.lookupReference('expirationTimeField').setDisabled(false);
this.lookupReference('deviceReadonlyField').setDisabled(false);
this.lookupReference('limitCommandsField').setDisabled(false);
+ this.lookupReference('disableReportsField').setDisabled(false);
}
},
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js
index d025b586..f6d88eed 100644
--- a/web/app/view/map/MapController.js
+++ b/web/app/view/map/MapController.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ Ext.define('Traccar.view.map.MapController', {
init: function () {
this.callParent();
this.lookupReference('showReportsButton').setVisible(
- Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableReport'));
+ Traccar.app.isMobile() && !Traccar.app.getPreference('disableReports', false));
this.lookupReference('showEventsButton').setVisible(
Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableEvents'));
},
diff --git a/web/l10n/en.json b/web/l10n/en.json
index dd310577..6f1cbc4c 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -106,7 +106,6 @@
"attributeMailSmtpAuth": "Mail: SMTP Auth Enable",
"attributeMailSmtpUsername": "Mail: SMTP Username",
"attributeMailSmtpPassword": "Mail: SMTP Password",
- "attributeUiDisableReport": "UI: Disable Report",
"attributeUiDisableEvents": "UI: Disable Events",
"attributeUiDisableVehicleFetures": "UI: Disable Vehicle Fetures",
"attributeUiDisableDrivers": "UI: Disable Drivers",
@@ -129,6 +128,7 @@
"userUserLimit": "User Limit",
"userDeviceReadonly": "Device Readonly",
"userLimitCommands": "Limit Commands",
+ "userDisableReports": "Disable Reports",
"userToken": "Token",
"loginTitle": "Login",
"loginLanguage": "Language",