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

add card layout to forms

parent 092d1e13
Branches
No related merge requests found
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
{% block content %} {% block content %}
<div class="form-container"> <div class="form-container">
<div class="form-header"> <div class="form-header">
<span class="tips"> <span class="tips">
{% block tips %} {% block tips %}
Enter your details into the fields below, then click the button to save. Enter your details into the fields below, then click the button to save.
{% endblock %} {% endblock %}
</span> </span>
</div> </div>
{% block form %} {% block form %}
<form action="{% block action_url %}{% url 'memberdb:register' %}{% endblock %}" method="post"> <form action="{% block action_url %}{% url 'memberdb:register' %}{% endblock %}" method="post">
...@@ -17,31 +17,35 @@ ...@@ -17,31 +17,35 @@
{% csrf_token %} {% csrf_token %}
{% if form.non_field_errors|length > 0 %} {% if form.non_field_errors|length > 0 %}
<p class="errornote"> <p class="errornote">
Please correct the errors below. Please correct the errors below.
</p> </p>
{{ form.non_field_errors }} {{ form.non_field_errors }}
{% endif %} {% endif %}
<div class="card m-3">
{% block extra_preform %}{% endblock %}
{% block extra_preform %}{% endblock %} {% for field in form %}
<div class="form-row">
{% for field in form %} {{ field.errors }}
<div class="form-row"> {{ field.label_tag }}
{{ field.errors }} {{ field }}
{{ field.label_tag }} {% if field.field.help_text %}
{{ field }} <p class="help">
{% if field.field.help_text %} {{ field.field.help_text|safe }}
<p class="help"> </p>
{{ field.field.help_text|safe }} {% endif %}
</p> </div>
{% endif %} {% endfor %}
</div> </div>
{% endfor %}
<div class="card m-3">
{% block postform %}{% endblock %} {% block postform %}{% endblock %}
<div class="submit-row"> <div class="submit-row">
<input type="submit" class="default" value="{% block action_text %}Register{% endblock %}"> <input type="submit" class="default" value="{% block action_text %}Register{% endblock %}">
</div>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}
</div> </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