misc: unify login blocks tags structure (#53264)
gitea/authentic/pipeline/head This commit looks good Details

This commit is contained in:
Thomas Jund 2022-11-24 18:25:15 +01:00 committed by Gitea
parent cd1a6e5cf4
commit 4c02778eb9
4 changed files with 52 additions and 43 deletions

View File

@ -5,13 +5,15 @@
{% endblock %}
{% block registration %}
<p>
<form enctype="multipart/form-data" method="post" class="pk-mark-optional-fields">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Submit' %}</button>
</div>
</form>
</p>
<div>
<p>
<form enctype="multipart/form-data" method="post" class="pk-mark-optional-fields">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans 'Submit' %}</button>
</div>
</form>
</p>
</div>
{% endblock %}

View File

@ -7,16 +7,18 @@
{% endblock %}
{% block content %}
{% include "authentic2_auth_fc/explanation.html" %}
<div id="fc-button-wrapper">
<div id="fc-button">
<a href="{{ login_url }}"
class="button connexion">
<span class="sr-only">{% trans 'Log in with FranceConnect' %}</span>
</a>
<div>
{% include "authentic2_auth_fc/explanation.html" %}
<div id="fc-button-wrapper">
<div id="fc-button">
<a href="{{ login_url }}"
class="button connexion">
<span class="sr-only">{% trans 'Log in with FranceConnect' %}</span>
</a>
</div>
</div>
<div id="fc-explanation-link">
<a href="{{ about_url }}" target="_blank" rel="noopener" title="{% trans "opens in new window" %}">{% trans "What is FranceConnect?" %}</a>
</div>
</div>
<div id="fc-explanation-link">
<a href="{{ about_url }}" target="_blank" rel="noopener" title="{% trans "What is FranceConnect?" %} {% trans "(opens in new window)" %}">{% trans "What is FranceConnect?" %}</a>
</div>
{% endblock %}

View File

@ -1,11 +1,12 @@
{% block login %}
<div>
{% if provider.button_description %}
<p>{{ provider.button_description }}</p>
{% endif %}
{% if provider.button_description %}
<p>{{ provider.button_description }}</p>
{% endif %}
<p id="oidc-p-{% firstof provider.slug provider.name|slugify %}">
<a id="oidc-a-{% firstof provider.slug provider.name|slugify %}"
href="{{ login_url }}" class="pk-button">{{ provider.button_label }}</a>
</p>
<p id="oidc-p-{% firstof provider.slug provider.name|slugify %}">
<a id="oidc-a-{% firstof provider.slug provider.name|slugify %}"
href="{{ login_url }}" class="pk-button">{{ provider.button_label }}</a>
</p>
</div>
{% endblock %}

View File

@ -3,22 +3,26 @@
{% block login-block-title %}
{% endblock %}
{% block before-login %}
{% if authenticator.button_description %}
<p>{{ authenticator.button_description }}</p>
{% endif %}
{% endblock %}
{% block login %}
<form method="post">
<div class="buttons">
<button class="submit-button" name="{{ submit_name }}">{{ authenticator.button_label }}</button>
{% if cancel %}
<button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}</button>
{% block content %}
<div>
{% block before-login %}
{% if authenticator.button_description %}
<p>{{ authenticator.button_description }}</p>
{% endif %}
</div>
</form>
{% endblock %}
{% endblock %}
{% block after-login %}
{% block login %}
<form method="post">
<div class="buttons">
<button class="submit-button" name="{{ submit_name }}">{{ authenticator.button_label }}</button>
{% if cancel %}
<button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}</button>
{% endif %}
</div>
</form>
{% endblock %}
{% block after-login %}
{% endblock %}
</div>
{% endblock %}