Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
uccportal
Commits
d2c08c0e
Commit
d2c08c0e
authored
Jan 25, 2019
by
frekk
Browse files
refactor templates to use base_form.html
parent
552d4dc8
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/memberdb/templates/base_form.html
0 → 100644
View file @
d2c08c0e
{% 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 %}
src/memberdb/templates/home.html
View file @
d2c08c0e
{% extends "
register
.html" %}
{% extends "
base_form
.html" %}
{% block title %}UCC Member Home{% endblock %}
{% block content_title %}
<h1>
Member home
</h1>
...
...
src/memberdb/templates/register.html
View file @
d2c08c0e
{% 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 %}
src/memberdb/templates/renew.html
View file @
d2c08c0e
{% 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 %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment