mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-22 16:02:16 +00:00
Authorisation template work
This commit is contained in:
@@ -1,51 +1,51 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-5">
|
||||
<div class="card card-default">
|
||||
<div class="row my-3">
|
||||
<div class="col-sm-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Contact Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Person</dt>
|
||||
<dd>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-5">Person</dt>
|
||||
<dd class="col-sm-7">
|
||||
{% if event.person %}
|
||||
{{ event.person.name }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
<dt class="col-sm-5">Email</dt>
|
||||
<dd class="col-sm-7">
|
||||
<span class="overflow-ellipsis">{{ event.person.email }}</span>
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>{{ event.person.phone }}</dd>
|
||||
<dt class="col-sm-5">Phone Number</dt>
|
||||
<dd class="col-sm-7">{{ event.person.phone }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.organisation %}
|
||||
<div class="card card-default">
|
||||
<div class="card-header">Organisation</div>
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Organisation Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Organisation</dt>
|
||||
<dd>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-5">Organisation</dt>
|
||||
<dd class="col-sm-7">
|
||||
{{ event.organisation.name }}
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>{{ object.organisation.phone }}</dd>
|
||||
<dt class="col-sm-5">Phone Number</dt>
|
||||
<dd class="col-sm-7">{{ object.organisation.phone }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-7">
|
||||
<div class="card card-info">
|
||||
<div class="col-sm-6">
|
||||
<div class="card border-info">
|
||||
<div class="card-header">Event Info</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Event Venue</dt>
|
||||
<dd>
|
||||
<dl class="row">
|
||||
<dt class="col-sm-5">Event Venue</dt>
|
||||
<dd class="col-sm-7">
|
||||
{% if object.venue %}
|
||||
<a href="{% url 'venue_detail' object.venue.pk %}" class="modal-href">
|
||||
{{ object.venue }}
|
||||
@@ -53,24 +53,24 @@
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Status</dt>
|
||||
<dd>{{ event.get_status_display }}</dd>
|
||||
<dt class="col-sm-5">Status</dt>
|
||||
<dd class="col-sm-7">{{ event.get_status_display }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt>Access From</dt>
|
||||
<dd>{{ event.access_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
<dt class="col-sm-5">Access From</dt>
|
||||
<dd class="col-sm-7">{{ event.access_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
|
||||
<dt>Event Starts</dt>
|
||||
<dd>{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
<dt class="col-sm-5">Event Starts</dt>
|
||||
<dd class="col-sm-7">{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt>Event Ends</dt>
|
||||
<dd>{{ event.end_date|date:"D d M Y" }} {{ event.end_time|date:"H:i" }}</dd>
|
||||
<dt class="col-sm-5">Event Ends</dt>
|
||||
<dd class="col-sm-7">{{ event.end_date|date:"D d M Y" }} {{ event.end_time|date:"H:i" }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt>Event Description</dt>
|
||||
<dd>{{ event.description|linebreaksbr }}</dd>
|
||||
<dt class="col-sm-5">Event Description</dt>
|
||||
<dd class="col-sm-12">{{ event.description|linebreaksbr }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if event.is_rig and event.internal and perms.RIGS.view_event %}
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 py-3">
|
||||
<div class="card card-default
|
||||
{% if object.authorised %}
|
||||
card-success
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="btn-group py-2">
|
||||
<div class="btn-group py-3">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-secondary"><span
|
||||
class="fas fa-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
@@ -22,7 +22,7 @@
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% if event.is_rig %}
|
||||
{% if event.internal %}
|
||||
<a class="btn btn-default item-add modal-href event-authorise-request
|
||||
<a class="btn item-add modal-href event-authorise-request
|
||||
{% if event.authorised %}
|
||||
btn-success
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
@@ -32,7 +32,7 @@
|
||||
{% endif %}
|
||||
"
|
||||
href="{% url 'event_authorise_request' object.pk %}">
|
||||
<i class="fas fa-send"></i>
|
||||
<i class="fas fa-paper-plane"></i>
|
||||
<span class="hidden-xs">
|
||||
{% if event.authorised %}
|
||||
Authorised
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<tr>
|
||||
<td>#</td>
|
||||
<td>Event Date</td>
|
||||
<td>Event Timings</td>
|
||||
<td>Event Details</td>
|
||||
<td>MIC</td>
|
||||
</tr>
|
||||
@@ -26,9 +25,7 @@
|
||||
{% if event.end_date and event.end_date != event.start_date %}
|
||||
<div><strong>{{ event.end_date|date:"D d/m/Y" }}</strong></div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<!---Times-->
|
||||
<td>
|
||||
<!---Times-->
|
||||
{% if not event.cancelled %}
|
||||
<dl class="dl-horizontal">
|
||||
{% if event.meet_at %}
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
{% load static %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
|
||||
$('form').on('submit', function () {
|
||||
$('#loading-modal').modal({
|
||||
backdrop: 'static',
|
||||
@@ -23,13 +22,11 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %}
|
||||
| {{ event.name }} {% if event.dry_hire %}<span class="badge">Dry Hire</span>{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="page-header my-3">
|
||||
<h1>
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %}
|
||||
| {{ event.name }} {% if event.dry_hire %}<span class="badge">Dry Hire</span>{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -46,7 +43,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card card-default">
|
||||
<div class="card border-primary">
|
||||
<div class="card-header" id="eventauth">Event Authorisation</div>
|
||||
|
||||
<div class="card-body">
|
||||
@@ -120,7 +117,7 @@
|
||||
|
||||
<div class="col-sm-12 col-md-4 text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary" type="submit">Authorise</button>
|
||||
<button class="btn btn-primary btn-lg" type="submit">Authorise</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,31 +20,22 @@
|
||||
<dd>{{ object.organisation.email }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal"
|
||||
id="auth-request-form">
|
||||
<form action="{{ form.action|default:request.path }}" method="POST" id="auth-request-form">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"
|
||||
for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
{% render_field form.email type="email" class+="form-control" %}
|
||||
</div>
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label"
|
||||
for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.email type="email" class+="form-control" %}
|
||||
</div>
|
||||
|
||||
<div class="text-right col-sm-3 col-sm-offset-9">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="form-control btn btn-primary">
|
||||
<span class="fas fa-send"></span>
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right col-sm-3 offset-sm-9">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="form-control btn btn-primary">
|
||||
<i class="fas fa-paper-plane"></i>
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}NottinghamTEC Email Address Required{% endblock %}
|
||||
{% block title %}TEC Email Address Required{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning">
|
||||
<h1>An error occured.</h1>
|
||||
<p>Your RIGS account must have an @nottinghamtec.co.uk email address before you can send emails to clients.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<h1>An error occured.</h1>
|
||||
<p>Your RIGS account must have an @nottinghamtec.co.uk email address before you can send emails to clients.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<h3>{{object.name}}</h3>
|
||||
</div>
|
||||
@@ -40,10 +40,10 @@
|
||||
{% if object.pk == user.pk %}
|
||||
<div class="col-sm-6 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'profile_update_self' %}" class="btn btn-default">
|
||||
Edit Profile <span class="fas fa-pencil"></span>
|
||||
<a href="{% url 'profile_update_self' %}" class="btn btn-secondary">
|
||||
Edit Profile <i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a href="{% url 'password_change' %}" class="btn btn-default">
|
||||
<a href="{% url 'password_change' %}" class="btn btn-secondary">
|
||||
Change Password <span class="fas fa-lock"></span>
|
||||
</a>
|
||||
</div>
|
||||
@@ -75,14 +75,14 @@
|
||||
</dl>
|
||||
{% if not request.is_ajax %}
|
||||
{% if object.pk == user.pk %}
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'reset_api_key' %}" class="btn btn-default">
|
||||
{% if user.api_key %}Reset API Key{% else %}Generate API Key{% endif %}
|
||||
<span class="fas fa-repeat"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Personal iCal Details</h4>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
@@ -136,7 +136,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="center-block">
|
||||
<img src="{{object.profile_picture}}" class="img-responsive img-rounded" />
|
||||
@@ -154,4 +154,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user