Skip to content
Snippets Groups Projects
Commit d2c08c0e authored by frekk's avatar frekk
Browse files

refactor templates to use base_form.html

parent 552d4dc8
Branches
Tags
No related merge requests found
{% extends "base.html" %}
{% block content_title %}<h1>Enter your details</h1>{% endblock %}
{% block content %}
<div class="form-container">
<div class="form-header">
<span class="tips">
{% block tips %}
Enter your details into the fields below, then click the button to save.
{% endblock %}
</span>
</div>
{% block form %}
<form action="{% block action_url %}{% url 'memberdb:register' %}{% endblock %}" method="post">
{% csrf_token %}
{% if form.non_field_errors|length > 0 %}
<p class="errornote">
Please correct the errors below.
</p>
{{ form.non_field_errors }}
{% endif %}
{% block extra_preform %}{% endblock %}
{% for field in form %}
<div class="form-row">
{{ field.errors }}
{{ field.label_tag }}
{{ field }}
{% if field.field.help_text %}
<p class="help">
{{ field.field.help_text|safe }}
</p>
{% endif %}
</div>
{% endfor %}
<div class="submit-row">
<input type="submit" class="default" value="{% block action_text %}Register{% endblock %}">
</div>
</form>
{% endblock %}
</div>
{% endblock %}
{% extends "register.html" %}
{% extends "base_form.html" %}
{% block title %}UCC Member Home{% endblock %}
{% block content_title %}
<h1>Member home</h1>
......
{% extends "base.html" %}
{% extends "base_form.html" %}
{% block title %}UCC Registration{% endblock %}
{% block content_title %}<h1>Register as a new member</h1>{% endblock %}
{% block content %}
<div class="form-container">
<div class="form-header">
<span class="tips">
{% block tips %}
Enter your details, and press "Register" when you are done.<br>
Once your membership has been approved, you will receive an email with further instructions to activate your account.
{% endblock %}
</span>
</div>
{% block form %}
<form action="{% block action_url %}{% url 'memberdb:register' %}{% endblock %}" method="post">
{% block tips %}
Enter your details, and press "Register" when you are done.<br>
Once your membership has been approved, you will receive an email with further instructions to activate your account.
{% endblock %}
{% csrf_token %}
{% if form.non_field_errors|length > 0 %}
<p class="errornote">
Please correct the errors below.
</p>
{{ form.non_field_errors }}
{% endif %}
{% block extra_preform %}{% endblock %}
{% for field in form %}
<div class="form-row">
{{ field.errors }}
{{ field.label_tag }}
{{ field }}
{% if field.field.help_text %}
<p class="help">
{{ field.field.help_text|safe }}
</p>
{% endif %}
</div>
{% endfor %}
<div class="submit-row">
<input type="submit" class="default" value="{% block action_text %}Register{% endblock %}">
</div>
</form>
{% endblock %}
</div>
{% endblock %}
\ No newline at end of file
{% block action_url %}{% url 'memberdb:register' %}{% endblock %}
{% block action_text %}Register{% endblock %}
{% extends "register.html" %}
{% extends "base_form.html" %}
{% block title %}UCC Membership Renewal{% endblock %}
{% block content_title %}
<h1>Renew your membership</h1>
......@@ -22,4 +22,4 @@ Please confirm that the details below have not changed since your last registrat
{% block action_url %}{% url 'memberdb:renew' %}{% endblock %}
{% block action_text %}Renew{% endblock %}
\ No newline at end of file
{% block action_text %}Renew{% endblock %}
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