Compare commits

...

2 Commits

Author SHA1 Message Date
c4fec483ae FIX/CHNG: Clients may see line prices on event auth form
Not sure why they couldn't previous, its not like we only quote totals...
2021-12-13 12:13:47 +00:00
3028fb92d9 Fix up the copy button stuff 2021-12-13 12:07:42 +00:00
7 changed files with 22 additions and 10 deletions

View File

@@ -46,7 +46,7 @@
<p class="dont-break-out">{{ event.notes|linebreaksbr }}</p> <p class="dont-break-out">{{ event.notes|linebreaksbr }}</p>
{% endif %} {% endif %}
<br> <br>
{% include 'item_table.html' %} {% include 'partials/item_table.html' %}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -348,7 +348,7 @@
{% render_field form.notes class+="form-control" %} {% render_field form.notes class+="form-control" %}
</div> </div>
</div> </div>
{% include 'item_table.html' %} {% include 'partials/item_table.html' %}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -26,7 +26,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<div class="card"> <div class="card">
{% with object=event auth=True %} {% with object=event auth=True %}
{% include 'item_table.html' %} {% include 'partials/item_table.html' %}
{% endwith %} {% endwith %}
</div> </div>
</div> </div>

View File

@@ -1,6 +1,7 @@
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %} {% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
{% load widget_tweaks %} {% load widget_tweaks %}
{% load static %} {% load static %}
{% load button from filters %}
{% block title %}Request Authorisation{% endblock %} {% block title %}Request Authorisation{% endblock %}
@@ -22,19 +23,26 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="alert alert-warning"> <div class="alert alert-warning pb-0">
<h1>Send authorisation request email.</h1> <h1>Send authorisation request email.</h1>
<p>Pressing send will email the address provided. Please triple check everything before continuing.</p> <p>Pressing send will email the address provided. <strong>Please triple check everything before continuing.</strong></p>
</div> </div>
<div class="alert alert-info"> <div class="alert alert-info pb-0">
{% if object.person.email or object.organisation.email %}
<dl class="dl-horizontal"> <dl class="dl-horizontal">
{% if object.person.email %}
<dt>Person Email</dt> <dt>Person Email</dt>
<dd id="person-email">{{ object.person.email }}</dd>{% if object.person.email %}<button class="btn btn-secondary btn-sm pr-1" data-clipboard-target="#person-email" data-content="Copied to clipboard!"><span class="fas fa-clipboard"></span></button>{% endif %} <dd><span id="person-email">{{ object.person.email }}</span>{% button 'copy' id='#person-email' %}</dd>
{% endif %}
{% if object.organisation.email %}
<dt>Organisation Email</dt> <dt>Organisation Email</dt>
<dd id="org-email">{{ object.organisation.email }}</dd>{% if object.organisation.email %}<button class="btn btn-secondary btn-sm pr-1" data-clipboard-target="#org-email" data-content="Copied to clipboard!"><span class="fas fa-clipboard"></span></button>{% endif %} <dd><span id="org-email">{{ object.organisation.email }}</span>{% button 'copy' id='#org-email' %}</dd>
{% endif %}
</dl> </dl>
{% else %}
<p>No email addresses saved to the client &#3232;_&#3232;</p>
{% endif %}
</div> </div>
<form action="{{ form.action|default:request.path }}" method="POST" id="auth-request-form"> <form action="{{ form.action|default:request.path }}" method="POST" id="auth-request-form">
{% csrf_token %} {% csrf_token %}

View File

@@ -78,7 +78,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="card"> <div class="card">
{% with object.event as object %} {% with object.event as object %}
{% include 'item_table.html' %} {% include 'partials/item_table.html' %}
{% endwith %} {% endwith %}
</div> </div>
</div> </div>

View File

@@ -212,6 +212,8 @@ def button(type, url=None, pk=None, clazz="", icon=None, text="", id=None, style
clazz += " btn-primary " clazz += " btn-primary "
icon = "fa-plus" icon = "fa-plus"
text = "New" text = "New"
elif type == 'copy':
return {'copy': True, 'id': id, 'style': style}
elif type == 'search': elif type == 'search':
return {'submit': True, 'class': 'btn-info', 'icon': 'fa-search', 'text': 'Search', 'id': id, 'style': style} return {'submit': True, 'class': 'btn-info', 'icon': 'fa-search', 'text': 'Search', 'id': id, 'style': style}
elif type == 'submit': elif type == 'submit':

View File

@@ -2,6 +2,8 @@
<button type="submit" class="btn {{ class }}" title="{{ text }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></button> <button type="submit" class="btn {{ class }}" title="{{ text }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></button>
{% elif pk %} {% elif pk %}
<a href="{% url target pk %}" class="btn {{ class }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%} {% if text == 'Print' %}target="_blank"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></a> <a href="{% url target pk %}" class="btn {{ class }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%} {% if text == 'Print' %}target="_blank"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></a>
{% elif copy %}
<button class="btn btn-secondary btn-sm mr-1" data-clipboard-target="{{id}}" data-content="Copied to clipboard!"><span class="fas fa-copy"></span></button>
{% else %} {% else %}
<a href="{% url target %}" class="btn {{ class }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></a> <a href="{% url target %}" class="btn {{ class }}" {% if id %}id="{{id}}"{%endif%} {% if style %}style="{{style}}"{%endif%}><span class="fas {{ icon }} align-middle"></span> <span class="d-none d-sm-inline align-middle">{{ text }}</span></a>
{% endif %} {% endif %}