aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-01 01:02:20 +1300
committerGitHub <noreply@github.com>2016-12-01 01:02:20 +1300
commit38b3a3e6df91b7c2135cfcca855826ce8f1b1e63 (patch)
treeb093fbcf8672b6106632cd9ac841f43a1e6942b6 /web
parent1ffe251cbc09e2199c936d68f5c1f82363436da1 (diff)
parentfb0c5989ba2f24a9f7311d94e8a283a3fa4f4c9f (diff)
downloadetbsa-traccar-web-38b3a3e6df91b7c2135cfcca855826ce8f1b1e63.tar.gz
etbsa-traccar-web-38b3a3e6df91b7c2135cfcca855826ce8f1b1e63.tar.bz2
etbsa-traccar-web-38b3a3e6df91b7c2135cfcca855826ce8f1b1e63.zip
Merge pull request #346 from Abyss777/test_mail
Add Test Mail button to Account dialog
Diffstat (limited to 'web')
-rw-r--r--web/app/view/SettingsMenuController.js1
-rw-r--r--web/app/view/UserDialog.js8
-rw-r--r--web/app/view/UserDialogController.js10
-rw-r--r--web/l10n/en.json1
4 files changed, 20 insertions, 0 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index 0ec2a78..2b4b920 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -53,6 +53,7 @@ Ext.define('Traccar.view.SettingsMenuController', {
onUserClick: function () {
var dialog = Ext.create('Traccar.view.UserDialog');
dialog.down('form').loadRecord(Traccar.app.getUser());
+ dialog.lookupReference('testMailButton').setHidden(false);
dialog.show();
},
diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js
index 52ec933..dfe1a7c 100644
--- a/web/app/view/UserDialog.js
+++ b/web/app/view/UserDialog.js
@@ -155,6 +155,14 @@ Ext.define('Traccar.view.UserDialog', {
tooltip: Strings.sharedGetMapState,
tooltipType: 'title'
}, {
+ glyph: 'xf003@FontAwesome',
+ minWidth: 0,
+ handler: 'testMail',
+ hidden: true,
+ reference: 'testMailButton',
+ tooltip: Strings.sharedTestMail,
+ tooltipType: 'title'
+ }, {
xtype: 'tbfill'
}, {
glyph: 'xf00c@FontAwesome',
diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js
index 0f1c022..f07031e 100644
--- a/web/app/view/UserDialogController.js
+++ b/web/app/view/UserDialogController.js
@@ -42,6 +42,16 @@ Ext.define('Traccar.view.UserDialogController', {
this.lookupReference('tokenField').setValue(newToken);
},
+ testMail: function () {
+ Ext.Ajax.request({
+ url: 'api/users/notifications/test',
+ method: 'POST',
+ failure: function (response) {
+ Traccar.app.showError(response);
+ }
+ });
+ },
+
onSaveClick: function (button) {
var dialog, record, store;
dialog = button.up('window').down('form');
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 2abd6ff..3732c1c 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -40,6 +40,7 @@
"sharedAlias": "Alias",
"sharedDeviceDistance": "Device Distance",
"sharedDevice": "Device",
+ "sharedTestMail": "Send Test Email",
"errorTitle": "Error",
"errorUnknown": "Unknown error",
"errorConnection": "Connection error",