mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-26 09:52:16 +00:00
Add sending of emails to clients.
Add email sending methods. Add TEC side sending of emails.
This commit is contained in:
@@ -11,34 +11,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% if event.is_rig %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
class="glyphicon glyphicon-duplicate"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a id="invoiceDropdownLabel" href="{% url 'invoice_event' event.pk %}" class="btn
|
||||
{% if event.invoice and event.invoice.is_closed %}
|
||||
btn-success
|
||||
{% elif event.invoice %}
|
||||
btn-warning
|
||||
{% else %}
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="glyphicon glyphicon-gbp"></span>
|
||||
<span class="hidden-xs">Invoice</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
@@ -184,34 +157,7 @@
|
||||
</div>
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% if event.is_rig %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
class="glyphicon glyphicon-duplicate"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a id="invoiceDropdownLabel" href="{% url 'invoice_event' event.pk %}" class="btn
|
||||
{% if event.invoice and event.invoice.is_closed %}
|
||||
btn-success
|
||||
{% elif event.invoice %}
|
||||
btn-warning
|
||||
{% else %}
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="glyphicon glyphicon-gbp"></span>
|
||||
<span class="hidden-xs">Invoice</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if event.is_rig %}
|
||||
@@ -229,34 +175,7 @@
|
||||
</div>
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% if event.is_rig %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
class="glyphicon glyphicon-duplicate"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a id="invoiceDropdownLabel" href="{% url 'invoice_event' event.pk %}" class="btn
|
||||
{% if event.invoice and event.invoice.is_closed %}
|
||||
btn-success
|
||||
{% elif event.invoice %}
|
||||
btn-warning
|
||||
{% else %}
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="glyphicon glyphicon-gbp"></span>
|
||||
<span class="hidden-xs">Invoice</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
33
RIGS/templates/RIGS/event_detail_buttons.html
Normal file
33
RIGS/templates/RIGS/event_detail_buttons.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% if event.is_rig %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
class="glyphicon glyphicon-duplicate"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
<a class="btn btn-default item-add modal-href event-authorise-request"
|
||||
href="{% url 'event_authorise_request' object.pk %}">
|
||||
<span class="glyphicon glyphicon-send"></span>
|
||||
Authorisation Request
|
||||
</a>
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a id="invoiceDropdownLabel" href="{% url 'invoice_event' event.pk %}" class="btn
|
||||
{% if event.invoice and event.invoice.is_closed %}
|
||||
btn-success
|
||||
{% elif event.invoice %}
|
||||
btn-warning
|
||||
{% else %}
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="glyphicon glyphicon-gbp"></span>
|
||||
<span class="hidden-xs">Invoice</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
12
RIGS/templates/RIGS/eventauthorisation_client_request.txt
Normal file
12
RIGS/templates/RIGS/eventauthorisation_client_request.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Hi there,
|
||||
|
||||
{{request.user.get_full_name}} has requested that you authorise N{{object.pk|stringformat:"05d"}} | {{object.name}}.
|
||||
|
||||
Please find the link below to complete the event booking process.
|
||||
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
|
||||
Remember that only Presidents or Treasurers are allowed to sign off payments. You may need to forward this email on.
|
||||
{% endif %}
|
||||
|
||||
{{request.scheme}}://{{request.get_host}}{% url 'event_authorise' object.pk hmac %}
|
||||
|
||||
The TEC Rig Information Gathering System
|
||||
32
RIGS/templates/RIGS/eventauthorisation_request.html
Normal file
32
RIGS/templates/RIGS/eventauthorisation_request.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Request Authorisation{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"
|
||||
for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.email type="email" class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right col-sm-3 col-sm-offset-9">
|
||||
<div class="form-group">
|
||||
<input type="submit" class="form-control btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user