{% extends "admin/change_form.html" %}
{% block form_top %}
<p>
Note that the summary field can use
<a href="http://en.wikipedia.org/wiki/Markdown">markdown</a> markup.
</p>
{%endblock%}

{% block extrahead %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="/media/css/showdown_preview.css" />
<script type="text/javascript" src="/media/showdown/showdown.js"></script>
<script type="text/javascript" src="/media/js/showdown_preview.js"></script>
<script language="javascript">
   window.onload = function() {
      tael = document.getElementsByTagName('textarea');
      for (i = 0; i < tael.length; i++) {
         if (tael[i].className.indexOf('markdown_preview') >= 0) {
           attach_showdown_preview(tael[i].id, 1);
         }
      }
   }
</script>
{%endblock%}

{%if notifications%}
{%block after_field_sets%}
<h4>Notifications sent for this item</h4>
<ul>
 {%for n in notifications%}
 <li>{{n.text}} by {{n.author}} sent at {{n.date}}</li>
 {%empty%}
 <li>No notifications sent for this item</li>
 {%endfor%}
</ul>
<p>
{%if original.org.email%}
New notification: <input type="text" name="new_notification" style="width:400px;" /> (<b>Note!</b> This comment is emailed to the organization!)<br/>
<input type="checkbox" name="remove_after_notify">Delete after notification</>
{%else%}
Organisation has <b>no email</b>, so cannot send notifications to it!
{%endif%}
</p>
<hr/>
{%endblock%}
{%endif%}
