1 {% extends "layout.html" %}
3 <base target="_parent">
6 {% block basecontent %}
8 function send_request(post_data){
9 var form = $("#notification_action_form");
10 var formData = form.serialize() + '&' + post_data + '=true';
11 var req = new XMLHttpRequest();
12 req.open("POST", ".", false);
13 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
14 req.onerror = function() { alert("problem occurred while trying to cancel current workflow"); }
15 req.onreadystatechange = function() { if(req.readyState === 4){
16 window.top.location.href += '';
20 function delete_notification()
22 send_request("delete");
24 function mark_unread()
26 send_request("unread");
30 <div class="d-flex justify-content-between border-bottom">
31 <span class="h3">{{notification.title}}</span>
32 <div class="btn_group">
33 <button class="btn btn-primary inbox-btn" onclick="mark_unread()">Mark Unread</button>
34 <button class="btn btn-danger inbox-btn" onclick="delete_notification()">Delete</button>
38 <p class="content-divider"></p>
40 {% if not notification.is_html %}
43 {{notification.content|safe}}
44 {% if not notification.is_html %}
47 <form id="notification_action_form" action="." method="post">