Commit 05101aca authored by frekk's avatar frekk
Browse files

update templates

parent fb533851
......@@ -32,17 +32,21 @@
{% with url_name=request.resolver_match.url_name %}
{% if request.member %}
<a class="navtab {% if url_name == 'home' %}active{% endif %}" href="{% url "memberdb:home" %}">Member home</a>
{% else %}
<a class="navtab {% if url_name == 'register' %}active{% endif %}" href="{% url "memberdb:register" %}">Register</a>
{% endif %}
<a class="navtab {% if url_name == 'register' %}active{% endif %}" href="{% url "memberdb:register" %}">Register</a>
{% if not request.user.is_authenticated %}
<a class="navtab {% if url_name == 'login' %}active{% endif %}" href="{% url "memberdb:login" %}">Login</a>
{% else %}
<a class="navtab {% if url_name == 'renew' %}active{% endif %}" href="{% url "memberdb:renew" %}">Renew membership</a>
{% if request.user.is_staff %}
<a class="navtab {% block adminactive %}{% endblock %}" href="{% url "admin:index" %}">Admin site</a>
{% endif %}
{% endif %}
{% if request.user.is_authenticated or request.member %}
<a class="navtab {% if url_name == 'logout' %}active{% endif %}" href="{% url "memberdb:logout" %}">Logout</a>
{% endif %}
{% endwith %}
......
{% extends "base.html" %}
{% load static %}
{% block title %}UCC Payment Gateway{% endblock %}
{% block extrahead %}
<!-- link to the SqPaymentForm library -->
<script type="text/javascript" src="https://js.squareup.com/v2/paymentform"></script>
{# bring the location IDs into javascript so the next bits know about them #}
<script type="text/javascript">
var applicationId = "{{ app_id }}";
var locationId = "{{ loc_id }}";
var amount = {{ payment.amount }};
</script>
<script type="text/javascript" src="{% static 'squarepay.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'squarepay.css' %}">
{% endblock %}
{% block content_title %}<h1>Checkout</h1>{% endblock %}
{% block content %}
<div class="form-container text-center">
<div class="form-header">
<span class="tips">{% block tips %}<b></b>{% endblock %}</span>
{% if payment.is_paid %}<span class="tips">
<p><b>It appears you have already successfully attempted this payment.</b><br><br>
Note that you will not be charged twice if even you submit again.</p>
</span>{% endif %}
<noscript>
<span class="tips error">Please enable javascript to use the payment form.</span>
</noscript>
</div>
</div>
</div>
{% endblock %}
......@@ -6,10 +6,14 @@
{% endblock %}
{% block tips %}
{% if not object %}
{% if not request.member %}
{% if request.user.is_authenticated %}
<b>You have no member record associated with this account.</b><br>
Please <a href="{% url 'memberdb:renew' %}">renew your membership</a> to get started.
{% else %}
<b>Something went wrong and your membership details could not be retrieved.</b> Please try <a href="{% url 'memberdb:login' %}">logging in</a>.
{% endif %}
{% else %}
You can see and modify some of your membership and account details below.
{% endif %}
{% endblock %}
......
......@@ -4,19 +4,18 @@
<h1>Thanks!</h1>
{% endblock %}
{% block tips %}
<b>Thanks for registering</b><br><br>
Once your registration has been approved, you will receive an email with instructions to activate your account.
{% endblock %}
{% block content %}
<h3>
Go to the <a href="{% url 'memberdb:home' %}">Member Home</a> page to see and edit some of your details.
Use <a href="{{ login_url }}">this link</a> to access <i>Member Home</i> to see and edit your details, and to pay online for your membership.
</h3>
<p>
<b>You will continue to have access to this website during this browser session.</b> Alternatively, you can use <a href="{{ login_url }}">this link</a> to access your member details from anywhere for the next 7 days.
Once your registration has been approved, you will receive an email with instructions to activate your account. If you signed up as a student, this information will be sent to the student email address that you provided.
</p>
<p>
Once you receive your UCC login details, you will be able to login normally to access the site.
{% if request.user.is_authenticated %} <!-- the user is currently logged in, so they may have dispense credit -->
You can either pay online now using your existing dispense credit or using a credit/debit card by going to <a href="{{ login_url }}">Member Home</a>, or you can pay in person later.
{% else %} <!-- the user isn't logged in, but they can still pay -->
You can pay online now with a credit/debit card by going to <a href="{{ login_url }}">Member Home</a>.
{% endif %}
</p>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment