Update boarding pass pages

Update glyphs to Bootstrap Icons and styling to use Boostrap 4.
Improve navigation and page titles throughout section.
This commit is contained in:
Joel Addison 2025-01-03 12:25:16 +00:00
parent 2119ac183a
commit 1e1e309fa6
6 changed files with 76 additions and 89 deletions

View file

@ -11,14 +11,13 @@
<!-- {% total_items_purchased 4 as pdns_count %} --> <!-- {% total_items_purchased 4 as pdns_count %} -->
{% ticket_type as ticket_type %} {% ticket_type as ticket_type %}
{% block header_title %} {% block head_title %}Boarding Pass for {{ attendee.user.email }}{% endblock %}
<h1>Boarding Pass for {{ attendee.user.email }}</h1> {% block page_title %}Boarding Pass for {{ attendee.user.email }}{% endblock %}
<div class="panel panel-info">
<p>This boarding pass was prepared at {{ boardingpass.created }} and was correct at that time.</p>
<p>For an up-to-date list of paid/unpaid items please see <a href="/tickets/review">this review page.</a></p>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="alert alert-warning" role="alert">
<p>This boarding pass was prepared at {{ boardingpass.created }} and was correct at that time.</p>
<p>For an up-to-date list of paid/unpaid items please see <a href="/tickets/review">this review page.</a></p>
</div>
<div>{{ boardingpass_body|safe }}</div> <div>{{ boardingpass_body|safe }}</div>
{% endblock %} {% endblock %}

View file

@ -22,16 +22,11 @@
</style> </style>
{% endblock %} {% endblock %}
{% block header_title %} {% block head_title %}Boarding Pass Overview{% endblock %}
<div> {% block page_title %}Boarding Pass Overview{% endblock %}
<a type=button" class="btn btn-primary btn-lg" href="{% url 'regidesk:check_in_scanner' %}">Go to scanning page</a> {% block page_lead %}Review and generate boarding passes for registered attendees. <a href="{% url 'regidesk:check_in_scanner' %}">Go to scanning page</a>{% endblock %}
</div>
{% endblock %}
{% block body %} {% block body %}
<h1>Boarding Pass Overview</h1>
<form class="form-horizontal" method="post" action="{% url "regidesk:boarding_prepare" %}"> <form class="form-horizontal" method="post" action="{% url "regidesk:boarding_prepare" %}">
{% csrf_token %} {% csrf_token %}
@ -46,7 +41,7 @@
{% endfor %} {% endfor %}
</select> </select>
<br/> <br/>
<button id="next-button" type="submit" class="btn btn-primary" disabled>Next <i class="fa fa-chevron-right"></i></button> <button id="next-button" type="submit" class="btn btn-primary" disabled>Next <i class="bi-chevron-right"></i></button>
</p> </p>
<table class="table table-striped table-bordered dataTable"> <table class="table table-striped table-bordered dataTable">

View file

@ -11,10 +11,11 @@
<!-- {% total_items_purchased 4 as pdns_count %} --> <!-- {% total_items_purchased 4 as pdns_count %} -->
{% ticket_type as ticket_type %} {% ticket_type as ticket_type %}
{% block head_title %}Boarding Pass Preparation{% endblock %}
{% block page_title %}Boarding Pass Preparation{% endblock %}
{% block page_lead %}Confirm the boarding pass is correct via the preview then send.{% endblock %}
{% block body %} {% block body %}
<h1>BoardingPass Preparation</h1>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<h2>Attendees</h2> <h2>Attendees</h2>
@ -67,7 +68,7 @@
{% include "regidesk/_bp_prepare_help.html" %} {% include "regidesk/_bp_prepare_help.html" %}
<button type="submit" class="btn btn-primary">Send {{ attendees|length }} Email{{ attendees|length|pluralize }}</button> <button type="submit" class="btn btn-primary">Send {{ attendees|length }} Email{{ attendees|length|pluralize }}</button>
<a class="btn" href="{% url "regidesk:boarding_overview" %}">Cancel</a> <a class="btn btn-secondary" href="{% url "regidesk:boarding_overview" %}">Cancel</a>
</form> </form>
</div> </div>
</form> </form>

View file

@ -1,11 +1,10 @@
{% extends "regidesk/base.html" %} {% extends "regidesk/base.html" %}
{% block head_title %}Boarding Pass Unavailable{% endblock %}
{% block header_title %} {% block page_title %}Boarding Pass Unavailable{% endblock %}
<h3>404 code not found</h3> {% block page_lead %}The provided code could not be found.{% endblock %}
{% endblock %}
{% block body %} {% block body %}
<a type=button" class="btn btn-primary btn-lg" href="{% url 'regidesk:check_in_scanner' %}">Return to scanning page</a> <a type=button" class="btn btn-primary" href="{% url 'regidesk:check_in_scanner' %}">Return to scanning page</a>
<a type=button" class="btn btn-primary btn-lg pull-right" href="{% url 'regidesk:boarding_overview' %}">Go to overview</a> <a type=button" class="btn btn-secondary" href="{% url 'regidesk:boarding_overview' %}">Go to overview page</a>
{% endblock %} {% endblock %}

View file

@ -1,50 +1,44 @@
{% extends "regidesk/base.html" %} {% extends "regidesk/base.html" %}
{% load static %} {% load static %}
{% block header_title %}
<h1>Boarding pass lookup</h1> {% block head_title %}Boarding Pass Lookup{% endblock %}
<p>Please scan or enter boarding pass code and click "Look Up"</p> {% block page_title %}Boarding Pass Lookup{% endblock %}
{% endblock %} {% block page_lead %}Please scan QR Code, or enter boarding pass code, and click submit. <a href="{% url 'regidesk:boarding_overview' %}">Go to overview (search)</a>{% endblock %}
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="{% static 'js/instascan.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/instascan.min.js' %}"></script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-lg-6">
<h2>Check-in</h2>
<p>Please scan QR Code or enter it below</p>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<p><strong id="note"></strong></p> <p><strong id="note"></strong></p>
<video id="preview"" autoplay style=" height: 400px;"></video> <video id="preview" autoplay style=" height: 400px;"></video>
<p>Select camera:</p> <div class="card border-dark" >
<ul id="camera-list" class="list-group"> <div class="card-header">
Select camera
</div>
<ul id="camera-list" class="list-group list-group-flush">
<li class="list-group-item active" aria-current="true">No camera found</li> <li class="list-group-item active" aria-current="true">No camera found</li>
</ul> </ul>
</div> </div>
</div>
<div class="col-lg-6"> <div class="col-lg-6">
<div id="code_div" class="form-group has-feedback has-error"> <form id="bp-form" class="needs-validation" novalidate>
<label class="control-label" for="bpcode">Boarding Pass Code</label> <div class="form-group">
<input id="bptext" type="text" class="form-control" id="bpcode" placeholder="Code"> <label for="bp-code">Boarding Pass Code</label>
<span id="input_icon" class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span> <input type="text" class="form-control text-uppercase" id="bp-code" placeholder="Code" required pattern="^[A-Z0-9]{6}$">
<span id="help_ok" class="help-block" style="display: none;">Format appears OK</span> <div class="invalid-feedback">
<span id="help_ur" class="help-block" style="display: block;">Format doesn't match</span> Please provide a valid code (6 alphanumeric characters).
</div> </div>
<div>
<button id="bpredir" class="btn btn-primary">Submit</button>
<button id="clear" class="btn btn-danger">Clear</button>
</div> </div>
<div class="py-5"> <button id="bp-redir" class="btn btn-primary" type="submit">Submit</button>
<a href="{% url 'regidesk:boarding_overview' %}">Overview (Search page)</a> <button id="bp-clear" class="btn btn-danger">Clear</button>
</form>
</div> </div>
</div> </div>
</div>
<script type="text/javascript"> <script type="text/javascript">
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') }); let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
@ -129,32 +123,32 @@
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
var code_div = document.getElementById("code_div"); let bpForm = document.getElementById("bp-form");
var icon = document.getElementById("input_icon"); let codeInput = document.getElementById("bp-code");
var tb = document.getElementById("bptext"); let clearBtn = document.getElementById("bp-clear");
var ok = document.getElementById("help_ok");
var unk = document.getElementById("help_ur"); bpForm.addEventListener('submit', function(event) {
var re = new RegExp('^[A-Z0-9]{6}$'); event.preventDefault();
document.getElementById("bpredir").onclick = function () {
location.href = tb.value; if (bpForm.checkValidity() === false) {
}; event.stopPropagation();
document.getElementById("clear").onclick = function () { bpForm.classList.add('was-validated');
tb.value = "";
};
tb.oninput = function () {
is_good = re.test(tb.value);
if (is_good) {
code_div.className = "form-group has-feedback has-success";
icon.className = "glyphicon glyphicon-ok form-control-feedback";
ok.style.display = "block";
unk.style.display = "none";
} else { } else {
code_div.className = "form-group has-feedback has-error"; let checkinUrl = window.location.href + codeInput.value + '/';
icon.className = "glyphicon glyphicon-remove form-control-feedback"; window.location.href = checkinUrl;
ok.style.display = "none";
unk.style.display = "block";
} }
console.log(is_good); }, false);
};
clearBtn.addEventListener('click', function (event) {
codeInput.value = "";
}, false);
codeInput.addEventListener('focusout', function(event) {
this.value = this.value.toLocaleUpperCase();
bpForm.checkValidity();
bpForm.classList.add('was-validated');
});
codeInput.focus();
</script> </script>
{% endblock %} {% endblock %}

View file

@ -1,7 +1,8 @@
{% extends "regidesk/base.html" %} {% extends "regidesk/base.html" %}
{% block head_title %}Checkin - {{ user.attendee.attendeeprofilebase.attendeeprofile.name }}{% endblock head_title %} {% block head_title %}Boarding Pass - {{ user.attendee.attendeeprofilebase.attendeeprofile.name }}{% endblock %}
{% block page_title %}Pre-print check{% endblock page_title %} {% block page_title %}Boarding Pass - Pre-print check{% endblock %}
{% block page_lead %}Confirm the details of the attendee then check them in. <a href="{% url 'regidesk:check_in_scanner' %}">Go to scanning page</a>{% endblock %}
{% block body %} {% block body %}
{% load registrasion_tags %} {% load registrasion_tags %}
@ -18,8 +19,6 @@
{% items_purchased 5 as raffle_tickets %} {% items_purchased 5 as raffle_tickets %}
{% ticket_type as ticket_type %} {% ticket_type as ticket_type %}
<a type="button" class="btn btn-outline-primary" href="{% url 'regidesk:check_in_scanner' %}">Return to scanning page</a>
<div class="card my-3"> <div class="card my-3">
<div class="card-header">Content Check</div> <div class="card-header">Content Check</div>
<div class="card-body"> <div class="card-body">