mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-30 23:39:54 +01:00 
			
		
		
		
	* Add Badges with official links to store pages on login page * Add AppStore/Google Play badges in static img assets [1][2] * Add translation for "Download on the AppStore" and "Get it on Google Play" [1] https://developer.apple.com/app-store/marketing/guidelines/ [2] https://partnermarketinghub.withgoogle.com/brands/google-play/visual-identity/badge-guidelines/ Signed-off-by: Alexis Mercier des Rochettes <apernouille@gmail.com>
		
			
				
	
	
		
			55 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends "base.html" %}
 | |
| {% comment %}
 | |
| SPDX-License-Identifier: GPL-2.0-or-later
 | |
| {% endcomment %}
 | |
| {% load i18n crispy_forms_tags static %}
 | |
| {% block title %}{% trans "Log in" %}{% endblock %}
 | |
| 
 | |
| {% block extracss %}
 | |
| <link rel="stylesheet" href="{% static "registration/css/login.css" %}">
 | |
| {% endblock %}
 | |
| 
 | |
| {% block content %}
 | |
| <div class="card bg-light mx-auto" style="max-width: 30rem;">
 | |
|     <h3 class="card-header text-center">
 | |
|         {% trans "Log in" %}
 | |
|     </h3>
 | |
|     <div class="card-body">
 | |
|         {% if user.is_authenticated %}
 | |
|         <div class="alert alert-warning">
 | |
|             {% blocktrans trimmed with username=request.user.username %}
 | |
|             You are authenticated as {{ username }}, but are not authorized to
 | |
|             access this page. Would you like to login to a different account,
 | |
|             or with a higher permission mask?
 | |
|             {% endblocktrans %}
 | |
|         </div>
 | |
|         {% endif %}
 | |
| 
 | |
|         {% if request.resolver_match.view_name == 'admin:login' %}
 | |
|         <div class="alert alert-info">
 | |
|             {% blocktrans trimmed %}
 | |
|             You must be logged with a staff account with the higher mask to access Django Admin.
 | |
|             {% endblocktrans %}
 | |
|         </div>
 | |
|         {% endif %}
 | |
| 
 | |
|         <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
 | |
|             {{ form | crispy }}
 | |
|             <input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-block btn-lg">
 | |
|             <a href="{% url 'password_reset' %}"
 | |
|                 class="badge badge-light">{% trans 'Forgotten your password or username?' %}</a>
 | |
|         </form>
 | |
| 
 | |
|         <div class="text-center mt-4">
 | |
|             <a href="https://apps.apple.com/fr/app/la-note-kfet/id6754661723" class="d-inline-block mx-1" aria-label="{% trans 'Download on the AppStore' %}" style="cursor: pointer;">
 | |
|                 <img src="/static/img/appstore_badge_fr.svg"
 | |
|                      alt="{% trans 'Download on the AppStore' %}" style="height: 50px;">
 | |
|             </a>
 | |
|             <a href="https://play.google.com/store/apps/details?id=org.crans.bde.note&hl=fr" class="d-inline-block mx-1" aria-label="{% trans 'Get it on Google Play' %}" style="cursor: pointer;">
 | |
|                 <img src="/static/img/playstore_badge_fr.svg"
 | |
|                      alt="{% trans 'Get it on Google Play' %}" style="height: 50px;">
 | |
|             </a>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| {% endblock %} |