core: cleanup templates, add template for backend authentication
This commit is contained in:
		| @ -16,6 +16,7 @@ class AuthenticationBackendFactor(FormView, AuthenticationFactor): | |||||||
|     """Authentication factor which authenticates against django's AuthBackend""" |     """Authentication factor which authenticates against django's AuthBackend""" | ||||||
|  |  | ||||||
|     form_class = AuthenticationBackendFactorForm |     form_class = AuthenticationBackendFactorForm | ||||||
|  |     template_name = 'login/factors/backend.html' | ||||||
|  |  | ||||||
|     def form_valid(self, form): |     def form_valid(self, form): | ||||||
|         """Authenticate against django's authentication backend""" |         """Authenticate against django's authentication backend""" | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								passbook/core/templates/login/factors/backend.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								passbook/core/templates/login/factors/backend.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | {% extends 'login/form.html' %} | ||||||
|  |  | ||||||
|  | {% load i18n %} | ||||||
|  |  | ||||||
|  | {% block above_form %} | ||||||
|  | <span class="pficon pficon-unlocked"></span> | ||||||
|  | {% trans "This is a text" %} | ||||||
|  | {% endblock %} | ||||||
| @ -10,6 +10,8 @@ | |||||||
| {% include 'partials/messages.html' %} | {% include 'partials/messages.html' %} | ||||||
| <form method="POST"> | <form method="POST"> | ||||||
|   {% csrf_token %} |   {% csrf_token %} | ||||||
|  |   {% block above_form %} | ||||||
|  |   {% endblock %} | ||||||
|   {% include 'partials/form_login.html' %} |   {% include 'partials/form_login.html' %} | ||||||
|   <button type="submit" class="btn btn-primary btn-block btn-lg">{% trans primary_action %}</button> |   <button type="submit" class="btn btn-primary btn-block btn-lg">{% trans primary_action %}</button> | ||||||
| </form> | </form> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer