Skip to content
Snippets Groups Projects
Commit 6fb5c5ca authored by unknown's avatar unknown
Browse files

add card layout to forms

parent 092d1e13
No related merge requests found
......@@ -5,11 +5,11 @@
{% 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>
<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">
......@@ -17,31 +17,35 @@
{% csrf_token %}
{% if form.non_field_errors|length > 0 %}
<p class="errornote">
Please correct the errors below.
</p>
{{ form.non_field_errors }}
<p class="errornote">
Please correct the errors below.
</p>
{{ form.non_field_errors }}
{% endif %}
<div class="card m-3">
{% block extra_preform %}{% endblock %}
{% 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 %}
{% 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>
{% endfor %}
<div class="card m-3">
{% block postform %}{% endblock %}
<div class="submit-row">
<input type="submit" class="default" value="{% block action_text %}Register{% endblock %}">
<div class="submit-row">
<input type="submit" class="default" value="{% block action_text %}Register{% endblock %}">
</div>
</div>
</form>
{% endblock %}
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
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