add newsletter send button
parent
0b9d363931
commit
febdff7602
@ -1,4 +0,0 @@
|
|||||||
form {
|
|
||||||
float:left;
|
|
||||||
margin-right:30px;
|
|
||||||
}
|
|
||||||
@ -1,17 +1,15 @@
|
|||||||
{% extends "admin/change_form.html" %}
|
{% extends "admin/change_form.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load custom_send %}
|
{% block content %}
|
||||||
|
{{ block.super }}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
{% block object-tools %}
|
<link rel="stylesheet" type="text/css" href="{% static 'mailer/change_style.css' %}" />
|
||||||
{% if change %}{% if not is_popup %}
|
|
||||||
<ul class="object-tools">
|
|
||||||
{% for button in buttons %}
|
|
||||||
<input type="button" value="{{ button.short_description }}" name="_button" onclick="window.alert('Hey')">
|
|
||||||
<!--<li><a href={% url button.view %} class="historylink">{{ button.short_description }}</a></li>-->
|
|
||||||
{% endfor %}
|
|
||||||
<li><a href="../history/" class="historylink">{% trans "History" %}</a></li>
|
|
||||||
{% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">View on site</a></li>{% endif%}
|
|
||||||
</ul>
|
|
||||||
{% endif %}{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function($){
|
||||||
|
$('<input type="submit" value="{% trans 'Save and send mail' %}" name="_send" class="send_mail"/>')
|
||||||
|
.prependTo('div.submit-row');
|
||||||
|
})(django.jQuery);
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
from django import template
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
|
|
||||||
@register.inclusion_tag('change_form.html')
|
|
||||||
def custom_send():
|
|
||||||
print("CUstom send!")
|
|
||||||
Loading…
Reference in New Issue