diff --git a/data/interfaces/default/notifier_config.html b/data/interfaces/default/notifier_config.html index aa5cb9c9..5e2fd229 100644 --- a/data/interfaces/default/notifier_config.html +++ b/data/interfaces/default/notifier_config.html @@ -151,6 +151,13 @@

Set custom arguments passed to the script.

+
+
+
+ +
+
+
@@ -171,6 +178,13 @@

Set a custom body.

+
+
+
+ +
+
+
@@ -335,6 +349,28 @@ }) % endif + $('.notifier-text-preview').click(function () { + var action = $(this).data('action'); + var subject = $('#' + action + '_subject').val(); + var body = $('#' + action + '_body').val(); + + $.ajax({ + url: 'get_notify_text_preview', + data: { + notify_action: action, + subject: subject, + body: body, + agent_id: "${notifier['agent_id']}", + agent_name: "${notifier['agent_name']}" + }, + cache: false, + async: true, + complete: function (xhr, status) { + $("#notifier-text-preview-modal").html(xhr.responseText).modal('show'); + } + }); + }); + $('#test_notifier').click(function () { doAjaxCall('set_notifier_config', $(this), 'tabs', true, false, sendTestNotification); }); diff --git a/data/interfaces/default/notifier_text_preview.html b/data/interfaces/default/notifier_text_preview.html new file mode 100644 index 00000000..31f944fb --- /dev/null +++ b/data/interfaces/default/notifier_text_preview.html @@ -0,0 +1,23 @@ +% if text: + +% endif \ No newline at end of file diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 0626b92f..40e7c057 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -1925,6 +1925,8 @@ +