Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 13422b6

Browse files
fabiangermannSimon Bächler
authored andcommitted
Style registration forms
1 parent 7b20f07 commit 13422b6

3 files changed

Lines changed: 32 additions & 26 deletions

File tree

feincmsorg/templates/registration/login.html

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,30 @@
66

77

88
{% block content_title %}
9-
<h2>Log in</h2>
109
{% endblock %}
1110

1211

1312
{% block inner-content %}
14-
<form action="." method="post" class="login_form">{% csrf_token %}
15-
{{ form.as_p }}
16-
<p class="submit"><button type="submit" name="submit" value="Login">Log in</button></p>
13+
<form action="." method="post" class="login_form clearfix">{% csrf_token %}
14+
<h2>Log in</h2>
15+
{% for field in form %}
16+
<div class="{% if field.errors %}errors {% endif %}{% if field.field.required %}required{% endif %}">
17+
{{ field.label_tag }}
18+
{{ field }}
19+
{{ field.errors }}
20+
</div>
21+
{% endfor %}
22+
<input type="submit" value="Login" />
1723
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
18-
</form>
19-
<a href="{% url email-register %}">Register</a>
20-
<div class="social-auth">
24+
</form>
25+
<h2 class="clearfix">Log in with social auth</h2>
26+
<div class="social-auth clearfix">
27+
<form>
2128
{% for name in social_auth.backends %}
22-
<li><a rel="nofollow" href="{% url socialauth_begin name %}">{{ name|title }}</a></li>
29+
<a class="button left" rel="nofollow" href="{% url socialauth_begin name %}">{{ name|title }}</a>
2330
{% endfor %}
31+
</form>
2432
</div>
25-
33+
<h2>Create new account</h2>
34+
<form><a class="button left" href="{% url email-register %}">Register</a></form>
2635
{% endblock %}

feincmsorg/templates/registration/registration_complete.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
{% block title %}Registration complete{% endblock %}
55
{% block body_class %}{{ block.super }} registration_complete{% endblock %}
66

7-
8-
{% block content_title %}
9-
<h2>Registration complete</h2>
10-
{% endblock %}
11-
12-
137
{% block inner-content %}
8+
<h2>Registration complete</h2>
149
<h3>Activate your account</h3>
1510
<p>We will be sending you an email with an activation link which you'll need to click to verify this account. If you choose not to activate your account it will eventually become disabled.</p>
1611
<p>Check your email.</p>
17-
{% endblock %}
12+
{% endblock %}

feincmsorg/templates/registration/registration_form.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
{% block body_class %}{{ block.super }} registration_form{% endblock %}
66

77

8-
{% block content_title %}
9-
<h2>Register for an account</h2>
10-
{% endblock %}
11-
12-
138
{% block inner-content %}
14-
<form action="." method="post">{% csrf_token %}
15-
{{ form.as_p }}
16-
<p class="submit"><button type="submit">Submit</button></p>
17-
</form>
18-
{% endblock %}
9+
<form action="." method="post" class="register_form">{% csrf_token %}
10+
<h2>Register for an account</h2>
11+
{% for field in form %}
12+
<div class="{% if field.errors %}errors {% endif %}{% if field.field.required %}required{% endif %}">
13+
{{ field.label_tag }}
14+
{{ field }}
15+
{{ field.errors }}
16+
</div>
17+
{% endfor %}
18+
<input type="submit" value="Submit" />
19+
</form>
20+
{% endblock %}

0 commit comments

Comments
 (0)