Finalise registration

Add shirt types and sizes. Improve messaging about discounts.
Restyle ticket wizard and product category screens. Enable page titles
and messages. Update dashboard to hide raffle.
Enable inventory population for dev container.
This commit is contained in:
Joel Addison 2019-10-02 23:25:17 +10:00
parent dfcd2acc74
commit 539fa2dfdd
18 changed files with 165 additions and 127 deletions

View file

@ -21,7 +21,7 @@ docker exec symposion ./manage.py migrate
docker exec symposion ./manage.py loaddata ./fixtures/{conference,sites,sitetree,flatpages}.json
docker exec symposion ./manage.py create_review_permissions
docker exec symposion ./manage.py loaddata ./fixtures/????/*.json
#docker exec symposion ./manage.py populate_inventory
docker exec symposion ./manage.py populate_inventory
if [ -e ./symposion-tools ]; then
pushd ./symposion-tools

View file

@ -61,7 +61,7 @@ class Command(BaseCommand):
name="Ticket",
description="Each type of ticket has different included products. "
"For details of what products are included, see our "
"<a href='https://linux.conf.au/attend/tickets/'>registration page</a>",
"<a href='https://linux.conf.au/attend/tickets/'>registration page</a>.",
required=True,
render_type=inv.Category.RENDER_TYPE_RADIO,
limit_per_user=1,
@ -101,13 +101,10 @@ class Command(BaseCommand):
name="Speakers' Dinner Ticket",
description="Tickets to our exclusive Speakers' Dinner on the "
"evening of "
f"{settings.SPEAKER_DINNER_TICKET_DATE: %A %d %B}. "
"You may purchase up "
"to 5 tickets in total, for significant others and "
"family members.",
f"{settings.SPEAKER_DINNER_TICKET_DATE: %A %d %B}.",
required=False,
render_type=inv.Category.RENDER_TYPE_QUANTITY,
limit_per_user=5,
limit_per_user=1,
order=30,
)
self.pdns_category = self.find_or_make(
@ -129,8 +126,10 @@ class Command(BaseCommand):
inv.Category,
("name",),
name="Shirt",
description="Commemorative conference polo shirts, featuring the "
f"linux.conf.au {settings.LCA_START.year} artwork.",
description="Commemorative conference shirts, featuring the "
f"linux.conf.au {settings.LCA_START.year} artwork. "
"View the <a href=\"https://linux.conf.au/attend/shirts\">"
"sizing guide</a>.",
required=False,
render_type=inv.Category.RENDER_TYPE_ITEM_QUANTITY,
order=50,
@ -355,13 +354,17 @@ class Command(BaseCommand):
# Shirts
ShirtGroup = namedtuple("ShirtGroup", ("prefix", "sizes"))
shirt_names = {
"mens": ShirtGroup(
"Men's/Straight Cut",
("S", "M", "L", "XL", "2XL", "3XL", "4XL"),
"straight": ShirtGroup(
"Straight Cut",
("S", "M", "L", "XL", "2XL", "3XL", "4XL", "5XL"),
),
"womens": ShirtGroup(
"Women's Classic Fit",
("8", "10", "12", "14", "16", "18"),
"semi_fitted": ShirtGroup(
"Semi-Fitted",
("XS", "S", "M", "L", "XL", "2XL"),
),
"fitted": ShirtGroup(
"Fitted",
("XS", "S", "M", "L", "XL", "2XL"),
),
}
@ -463,7 +466,7 @@ class Command(BaseCommand):
volunteer_ticket_cap = self.find_or_make(
cond.TimeOrStockLimitFlag,
("description", ),
description="Reserrved for volunteers and organizers",
description="Reserved for volunteers and organisers",
condition=cond.FlagBase.DISABLE_IF_FALSE,
limit=62,
)
@ -563,14 +566,14 @@ class Command(BaseCommand):
speaker_tickets.proposal_kind.set(self.main_conference_proposals)
speaker_tickets.products.set([self.ticket_speaker, ])
# Speaker dinner tickets are for primary and secondary speakers
# Speaker dinner tickets are for primary speakers only
speaker_dinner_tickets = self.find_or_make(
cond.SpeakerFlag,
("description", ),
description="Speaker dinner tickets",
condition=cond.FlagBase.ENABLE_IF_TRUE,
is_presenter=True,
is_copresenter=True,
is_copresenter=False,
)
speaker_dinner_tickets.proposal_kind.set(self.main_conference_proposals)
speaker_dinner_tickets.categories.set([self.speakers_dinner_ticket, ])
@ -767,7 +770,7 @@ class Command(BaseCommand):
ticket_staff_inclusions = self.find_or_make(
cond.IncludedProductDiscount,
("description", ),
description="Complimentary for ticket holder staff)",
description="Complimentary for ticket holder (Staff)",
)
ticket_staff_inclusions.enabling_products.set([
self.ticket_team,

View file

@ -360,7 +360,7 @@ PROPOSAL_FORMS = {
# Registrasion bits:
ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile"
ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm"
INVOICE_CURRENCY = "NZD"
INVOICE_CURRENCY = "AUD"
TICKET_PRODUCT_CATEGORY = 1
TERMS_PRODUCT_CATEGORY = 2
ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm"
@ -546,14 +546,14 @@ SPEAKERS_DINNER_ADULT = SpeakersDinnerCat.create(
"Includes an adult's meal and full beverage service.",
timedelta(hours=1))
SPEAKERS_DINNER_CHILD = SpeakersDinnerCat.create(
"Child", Decimal("60.00"),
"Children 14 and under. "
"Includes a child's meal and soft drink service.",
timedelta(hours=1))
# SPEAKERS_DINNER_CHILD = SpeakersDinnerCat.create(
# "Child", Decimal("60.00"),
# "Children 14 and under. "
# "Includes a child's meal and soft drink service.",
# timedelta(hours=1))
SPEAKERS_DINNER_INFANT = SpeakersDinnerCat.create(
"Infant", Decimal("00.00"),
"Infant must be seated in an adult's lap. "
"No food or beverage service.",
timedelta(hours=1))
# SPEAKERS_DINNER_INFANT = SpeakersDinnerCat.create(
# "Infant", Decimal("00.00"),
# "Infant must be seated in an adult's lap. "
# "No food or beverage service.",
# timedelta(hours=1))

View file

@ -10,10 +10,13 @@
<br/>
{% endif %}
<p>
{% if form|has_required_fields %}
<blockquote>
Fields marked with a * are required
</blockquote>
Fields marked with a * are required.
{% endif %}
{% if form|has_price_fields %}
<strong>Item prices are before any discount.</strong>
{% endif %}
</p>
{{ form|crispy }}

View file

@ -3,10 +3,10 @@
<h2>Tax Invoice/Statement</h2>
<h3>Linux Australia</h3>
<h4>GST #90-792-369</h4>
<h4>ABN 56 987 117 479</h4>
<p>
Enquiries: please e-mail <a href="mailto:contact@lca2019.org">contact@lca2019.org</a>
Enquiries: please e-mail <a href="mailto:contact@lca2020.linux.org.au">contact@lca2020.linux.org.au</a>
</p>
<ul class="list-unstyled">
@ -23,7 +23,7 @@
{{ invoice.recipient|linebreaksbr}}
</div>
<p>This invoice has been issued as a result of an application to attend {% conference_name %}. All amounts are in New Zealand Dollars (NZD).</p>
<p>This invoice has been issued as a result of an application to attend {% conference_name %}. All amounts are in Australian Dollars (AUD).</p>
<table class="table table-striped my-4">
<thead>
@ -47,7 +47,7 @@
<tr><th colspan="4"></th></tr>
<tr>
<th colspan="3">Includes 15% New Zealand Goods and Services Tax</th>
<th colspan="3">Includes 10% Australian Goods and Services Tax</th>
<td class="text-right">${{ invoice.value|gst}}</td>
</tr>
@ -87,5 +87,4 @@
Sydney NSW 2001 <br />
Australia <br />
ABN 56 987 117 479 <br />
NZ GST #90-792-369
<p>

View file

@ -1,9 +1,15 @@
{% extends "utility_page.html" %}
{% extends "site_base.html" %}
{% load staticfiles %}
{% load lca2018_tags %}
{% load i18n %}
{% block head_title %}{% block page_title %}{% endblock %}{% endblock %}
{% block utility_body %}
{% block proposals_body %}
{% endblock %}
{% block content_base %}
{% block content %}
<div class="jumbotron rego-content">
{% block proposals_body %}
{% endblock %}
</div>
{% endblock content %}
{% endblock %}

View file

@ -1,16 +1,31 @@
{% if discounts %}
<div class="my-4 py-4 px-4">
<h4>Discounts and Complimentary Items</h4>
<p>The following discounts and complimentary items are available to you. If you wish to take advantage of this offer, you must choose your items below. The discounts will be applied automatically when you check out.</p>
<div class="alert alert-danger my-4 pb-4 text-center">
<h4 class="alert-heading">Discounts and Complimentary Items</h4>
<p>The following discounts and complimentary items are available to you:</p>
{% regroup discounts by discount.description as discounts_grouped %}
<ul class="d-inline-block text-left">
{% for discount_type in discounts_grouped %}
<strong>{{ discount_type.grouper }}</strong>
<ul>
{% for discount in discount_type.list %}
<li>{{ discount.quantity }} &times; {{ discount.clause }}</li>
{% endfor %}
</ul>
<li>
<strong>{{ discount_type.grouper }}</strong>
<ul>
{% for discount in discount_type.list %}
<li>{{ discount.quantity }} &times; {{ discount.clause }}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<p>
<strong>
Please ensure you enter a value in the form below to take advantage of this discount.<br>
The discounts will be applied automatically when you check out.
</strong>
</p>
<p class="mb-0">
<strong>
If you do not enter anything, you will not receive anything from this category.
</strong>
</p>
</div>
{% endif %}

View file

@ -1,14 +1,14 @@
{% extends "registrasion/base.html" %}
{% load lca2018_tags %}
{% block header_title %}Buy Your Ticket{% endblock %}
{% block header_paragraph %}Step {{ current_step }} of {{ total_steps|add:1 }} &ndash; {{ title }} {% endblock %}
{% block page_title %}Buy Your Ticket{% endblock %}
{% block page_lead %}Step {{ current_step }} of {{ total_steps|add:1 }} &ndash; {{ title }} {% endblock %}
{% block scripts_extra %}
{% for section in sections %}
{{ section.form.media.js }}
{% endfor %}
<script type="text/javascript">
<script type="text/javascript">
postcode_label = $("label[for='id_profile-state']");
postcode_help = $("#id_profile-state + p");
$('#id_profile-country').change(function () {
@ -20,13 +20,10 @@
postcode_help.hide();
} });
$("#id_profile-country").change();
</script>
</script>
{% endblock %}
{% block proposals_body %}
<form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
{% csrf_token %}
@ -38,21 +35,19 @@
{% endif %}
<fieldset>
{% if section.discounts %}
{% include "registrasion/discount_list.html" with discounts=section.discounts %}
{% endif %}
{% include "_form_snippet.html" with form=section.form %}
<br />
</fieldset>
{% endfor %}
{% if current_step > 1 %}
<a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a>
{% if section.discounts %}
{% include "registrasion/discount_list.html" with discounts=section.discounts %}
{% endif %}
<input class="btn btn-primary" type="submit" value="Next Step" />
{% include "_form_snippet.html" with form=section.form %}
<br />
</fieldset>
{% endfor %}
{% if current_step > 1 %}
<a class="btn btn-secondary" role="button" href="{{ previous_step }}">Back</a>
{% endif %}
<input class="btn btn-primary" type="submit" value="Next Step" />
</form>
{% endblock %}

View file

@ -3,11 +3,12 @@
{% load lca2018_tags %}
{% load staticfiles %}
{% block header_title %}{% conference_name %}{% endblock %}
{% block head_title %}Tax Invoice/Statement #{{ invoice.id }}{% endblock %}
{% block page_title %}{% conference_name %}{% endblock %}
{% block proposals_body %}
{% include "registrasion/_invoice_details.html" %}
<div class="hidden-print mb-4 pb-4">
<div class="d-print-none mb-4 pb-4">
{% if invoice.is_unpaid %}
<p>
<strong>NOTICE:</strong> The above invoice is automatically generated, and
@ -26,7 +27,7 @@
<a class="btn btn-primary" href='{% url "registripe_card" invoice.id invoice.user.attendee.access_code %}'>Pay this invoice by card</a>
{% if user.is_staff %}
<a class="btn btn-primary" href="{% url "manual_payment" invoice.id %}">Apply manual payment</a>
<a class="btn btn-secondary" href="{% url "manual_payment" invoice.id %}">Apply manual payment</a>
{% endif %}
{% elif invoice.is_paid %}
@ -37,6 +38,4 @@
{% endif %}
</div>
{% endblock %}

View file

@ -2,35 +2,26 @@
{% load registrasion_tags %}
{% load lca2018_tags %}
{% block header_title %}Product Category: {{ category.name }}{% endblock %}
{% block header_inset_image %}{% illustration "lavender.svg" %}{% endblock %}
{% block page_title %}Product Category: {{ category.name }}{% endblock %}
{% block scripts_extra %}
{{ voucher_form.media.js }}
{{ form.media.js }}
{% endblock %}
{% block proposals_body %}
<form class="form-horizontal my-4" method="post" action="">
{% csrf_token %}
<div class="vertical-bigger"></div>
{% items_purchased category as items %}
{% if items %}
<h3>Paid items</h3>
<p>You have already paid for the following items:</p>
{% include "registrasion/_items_list.html" with items=items %}
{% endif %}
<h1>{{ category.name }}</h1>
<h2>{{ category.name }}</h2>
<blockquote>{{ category.description|safe }}</blockquote>
<fieldset>
@ -38,16 +29,13 @@
{% include "registrasion/discount_list.html" with discounts=discounts %}
{% endif %}
<h2>Make a selection</h2>
<h3>Make a selection</h3>
{% include "_form_snippet.html" with form=form %}
<br />
<div class="btn-group">
<input class="btn btn-primary" type="submit" value="Add to cart" />
<a href="{% url "dashboard" %}" class="btn btn-default">Return to dashboard</a>
</div>
<input class="btn btn-primary" type="submit" value="Add to cart" />
<a href="{% url "dashboard" %}" class="btn btn-link">Return to dashboard</a>
</fieldset>
</form>
{% endblock %}

View file

@ -2,9 +2,8 @@
{% load registrasion_tags %}
{% load lca2018_tags %}
{% block header_title %}Review your selection{% endblock %}
{% block header_inset_image %}{% illustration "wineglass.svg" %}{% endblock %}
{% block header_paragraph %}
{% block page_title %}Review your selection{% endblock %}
{% block page_lead %}
Please ensure that you have selected all of the products you require, including
t-shirts and social event tickets.
{% endblock %}
@ -22,8 +21,7 @@
{% if pending %}
<div class="my-4">
<h2>Current selection</h2>
<p>You've selected the following items, which will be in your invoice when
you check out:<p>
<p>You've selected the following items, which will be in your invoice when you check out:<p>
{% include "registrasion/_items_list.html" with items=pending %}
</div>
{% endif %}
@ -39,20 +37,22 @@
<div class="my-4">
<h2>Modify your selection</h2>
<p>
{% missing_categories as missing %}
{% if missing %}
<strong>You have <em>not</em> selected anything from the following
categories. If your ticket includes any of these, you still need to
make a selection:
</strong>
<div class="alert alert-warning my-4 pb-4">
<h4 class="alert-heading">You have empty categories</h4>
<p>You have <em>not</em> selected anything from the following
categories. If your ticket includes any of these, you still need to
make a selection:
</p>
{% include "registrasion/_category_list.html" with categories=missing %}
{% endif %}
</p>
</div>
{% endif %}
<p>
<strong>You can also change your selection from these categories:</strong>
<strong>You can change your selection from these categories:</strong>
{% available_categories as available %}
{% include "registrasion/_category_list.html" with categories=available exclude=missing %}
</p>
@ -64,7 +64,6 @@
</p>
</div>
<div class="my-4">
<h2>What next?</h2>
{% if pending %}
@ -88,6 +87,4 @@
{% endif %}
</div>
{% endblock %}

View file

@ -63,7 +63,7 @@
{% endblock %}
{% block header_title %}Credit card payment for invoice #{{ invoice.id}}{% endblock %}
{% block page_title %}Credit card payment for invoice #{{ invoice.id}}{% endblock %}
{% block proposals_body %}

View file

@ -31,14 +31,14 @@
</head>
<body class="{% block body_class %}{% endblock %}">
{% block template_overrides %}{% endblock %}
<header class="clearfix hidden-print">
<header class="clearfix d-print-none">
{% block alert %}{% endblock %}
{% block navbar %}{% include 'nav.html' %}{% endblock %}
</header>
{% if messages %}
<div class="container my-5 alert alert-primary">
<ul class="messagelist hidden-print list-unstyled">
<ul class="messagelist d-print-none list-unstyled">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
@ -47,11 +47,13 @@
{% endif %}
<main role="main" class="{% block main_class %}container{% endblock %}">
<h1 class="page-title mb-5">{% block page_title %}{% endblock %}</h1>
<div class="page-header mb-5">
<h1 class="page-title">{% block page_title %}{% endblock %}</h1>
<p class="lead">{% block page_lead %}{% endblock %}</p>
</div>
{% block body_base %}
{% block body_out %}
<div class="row">
<div class="col-md-12">
{% block body_outer %}
@ -98,7 +100,7 @@
{% endblock %}
</main>
<footer class="footer mt-4">
<footer class="footer mt-4 d-print-none">
<div class="container py-4">
<div class="row">
<div class="col-md-4 pb-4">

View file

@ -30,20 +30,21 @@
</div>
</div>
{% if not user.attendee.completed_registration %}
<div class="mb-4">
<div class="row">
{% if not user.attendee.completed_registration %}
<div class="col-12">
<h3>Register</h3>
<p>To attend the conference, you must create an attendee profile and purchase your ticket</p>
<div class="mt-auto">
<a class="btn btn-primary" role="button" href="{% url "guided_registration" %}">Get your ticket</a>
<a class="btn btn-lg btn-primary" role="button" href="{% url "guided_registration" %}">Get your ticket</a>
</div>
</div>
</div>
</div>
</div>
{% else %}
{% else %}
<div class="mb-4">
<div class="row">
<div class="col-md-6 my-3 d-flex flex-column">
<h3>Attendee Profile</h3>
<p>If you would like to change the details on your badge or your attendee statistics, you may edit your attendee profile here.</p>
@ -110,6 +111,7 @@
</div>
{% endif %}
{% if false %}
<div class="col-md-6 my-3 d-flex flex-column">
<h4>Raffle Tickets</h4>
@ -117,6 +119,7 @@
{# REMOVE HARDCODED CATEGORY NUMBER!!!! #}
<p><a href="/tickets/category/8">Buy raffle tickets</a></p>
</div>
{% endif %}
{% available_credit as credit %}
{% if credit %}

View file

@ -1,7 +1,7 @@
{% extends "content_page.html" %}
{% load staticfiles %}
{% block header_title %}{% block page_title %}{% endblock %}{% endblock %}
{% block head_title %}{% block page_title %}{% endblock %}{% endblock %}
{% block content_base %}
{% block utility_body_outer %}

View file

@ -17,6 +17,27 @@ def has_required_fields(form):
return False
@register.filter
def has_price_fields(form):
for field in form:
if isinstance(field, Form):
return has_price_fields(field)
if '$' in field.field.help_text:
return True
if '$' in field.field.label:
return True
choices = getattr(field.field, 'choices', [])
if choices:
for choice_id, choice_text in choices:
if '$' in choice_text:
return True
return False
@register.filter
def any_is_void(invoices):
for invoice in invoices:
@ -41,4 +62,4 @@ def clean_text(txt):
@register.filter
def twitter_handle(txt):
# Add @ to twitter handle if not present
return txt if txt.startswith('@') else '@{}'.format(txt)
return txt if txt.startswith('@') else '@{}'.format(txt)

View file

@ -61,6 +61,11 @@ h3, .h3 {
height: 50px;
}
.rego-content {
border: 1px solid #000;
background-color: #fff;
}
/* END LCA2020 */
.messagelist {
@ -69,7 +74,9 @@ h3, .h3 {
.asteriskField:before { content: ' '; }
label.label-required:after { content: ' *'; }
.abstract, .bio, .monospace-text {
font-family: Hack, monospace;
white-space: pre-wrap;
}
}

View file

@ -345,8 +345,8 @@ def _guided_registration_profile_and_voucher(request):
profile_section = GuidedRegistrationSection(
title="Profile and Personal Information",
form=profile_form,
description=("<div class=\"text-info\"><em>You can come back and edit these details any time before January 15, "
"2018.</em></div>"),
description=("<div class=\"text-info\"><em>You can come back and edit these details any time before "
"January 6 2020.</em></div>"),
)
return [voucher_section, profile_section]