Skip to content

Commit 5beed47

Browse files
committed
Define a "login_form" template block in login.html
1 parent da05e22 commit 5beed47

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

tcms/templates/registration/login.html

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,36 @@
77
<div class="container">
88
<div class="row">
99
<div class="col-sm-7 col-md-6 col-lg-5 login">
10-
{{ form.non_field_errors }}
11-
<form class="form-horizontal" role="form" action="{% url "tcms-login" %}" method="POST">
12-
{% csrf_token %}
13-
<input type="hidden" name="next" value="{{ next }}">
10+
{% block login_form %}
11+
{{ form.non_field_errors }}
12+
<form class="form-horizontal" role="form" action="{% url "tcms-login" %}" method="POST">
13+
{% csrf_token %}
14+
<input type="hidden" name="next" value="{{ next }}">
1415

15-
<div class="form-group">
16-
{{ form.username.errors }}
17-
<label for="inputUsername" class="col-sm-2 col-md-2 control-label">{% trans "Username" %}</label>
18-
<div class="col-sm-10 col-md-10">
19-
<input type="text" class="form-control" id="inputUsername" name="username" placeholder="" tabindex="1">
20-
</div>
21-
</div>
22-
<div class="form-group">
23-
{{ form.password.errors }}
24-
<label for="inputPassword" class="col-sm-2 col-md-2 control-label">{% trans "Password" %}</label>
25-
<div class="col-sm-10 col-md-10">
26-
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="" tabindex="2">
27-
</div>
28-
</div>
29-
<div class="form-group">
30-
<div class="col-xs-8 col-sm-offset-2 col-sm-6 col-md-offset-2 col-md-6">
31-
<span class="help-block"><a href="{% url "tcms-password_reset" %}" tabindex="6">{% trans "Forgot password" %}</a>?</span>
32-
</div>
33-
<div class="col-xs-4 col-sm-4 col-md-4 submit">
34-
<button type="submit" class="btn btn-primary btn-lg" tabindex="4">{% trans "Log in" %}</button>
35-
</div>
36-
</div>
37-
</form>
16+
<div class="form-group">
17+
{{ form.username.errors }}
18+
<label for="inputUsername" class="col-sm-2 col-md-2 control-label">{% trans "Username" %}</label>
19+
<div class="col-sm-10 col-md-10">
20+
<input type="text" class="form-control" id="inputUsername" name="username" placeholder="" tabindex="1">
21+
</div>
22+
</div>
23+
<div class="form-group">
24+
{{ form.password.errors }}
25+
<label for="inputPassword" class="col-sm-2 col-md-2 control-label">{% trans "Password" %}</label>
26+
<div class="col-sm-10 col-md-10">
27+
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="" tabindex="2">
28+
</div>
29+
</div>
30+
<div class="form-group">
31+
<div class="col-xs-8 col-sm-offset-2 col-sm-6 col-md-offset-2 col-md-6">
32+
<span class="help-block"><a href="{% url "tcms-password_reset" %}" tabindex="6">{% trans "Forgot password" %}</a>?</span>
33+
</div>
34+
<div class="col-xs-4 col-sm-4 col-md-4 submit">
35+
<button type="submit" class="btn btn-primary btn-lg" tabindex="4">{% trans "Log in" %}</button>
36+
</div>
37+
</div>
38+
</form>
39+
{% endblock %}
3840

3941
{% block custom_login %}
4042
{% endblock %}

0 commit comments

Comments
 (0)