UI - [Send test notification] - Refactor to use all tokens like a real watch and Notification Body+Title from UI value (#2079)

This commit is contained in:
dgtlmoon
2024-01-04 17:02:31 +01:00
committed by GitHub
parent 2db04e4211
commit d115b2c858
7 changed files with 61 additions and 35 deletions

View File

@@ -24,14 +24,17 @@ $(document).ready(function() {
})
data = {
window_url : window.location.href,
notification_urls : $('.notification-urls').val(),
notification_body: $('#notification_body').val(),
notification_format: $('#notification_format').val(),
notification_title: $('#notification_title').val(),
notification_urls: $('.notification-urls').val(),
window_url: window.location.href,
}
for (key in data) {
if (!data[key].length) {
alert(key+" is empty, cannot send test.")
return;
}
if (!data['notification_urls'].length) {
alert("Notification URL list is empty, cannot send test.")
return;
}
$.ajax({