Clarify some more conditions in the templates

This commit is contained in:
Olivier 'reivilibre
2025-10-28 16:46:19 +00:00
parent 647c8e703a
commit ea7f568d81
3 changed files with 7 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ Please see LICENSE files in the repository root for full details.
</div>
</header>
<form method="post" class="flex flex-col"{% if redirect_uri %} action="{{ redirect_uri }}"{% endif %}>
<form method="post" class="flex flex-col"{% if redirect_uri is not none %} action="{{ redirect_uri }}"{% endif %}>
{% for key, value in params|items %}
<input type="hidden" name="{{ key }}" value="{{ value }}" />
{% endfor %}

View File

@@ -19,7 +19,7 @@ Please see LICENSE files in the repository root for full details.
</div>
</header>
{% if current_session %}
{% if current_session is not none %}
<p class="cpd-text-body-md-regular">
{{ _("mas.navbar.signed_in_as", username=current_session.user.username) }}
</p>

View File

@@ -26,7 +26,7 @@ Please see LICENSE files in the repository root for full details.
</p>
</div>
</header>
{% elif upstream_oauth_provider.human_name %}
{% elif upstream_oauth_provider.human_name is not none %}
<header class="page-heading">
<div class="icon">
{{ icon.user_profile_solid() }}
@@ -55,9 +55,9 @@ Please see LICENSE files in the repository root for full details.
</header>
{% endif %}
{% if upstream_oauth_provider.human_name %}
{% if upstream_oauth_provider.human_name is not none %}
<section class="upstream-oauth2-provider-account">
{% if upstream_oauth_provider.brand_name %}
{% if upstream_oauth_provider.brand_name is not none %}
{{ logo(brand=upstream_oauth_provider.brand_name, class="brand") }}
{% else %}
{{ icon.user_profile() }}
@@ -67,7 +67,7 @@ Please see LICENSE files in the repository root for full details.
<h3 class="provider">
{{- _("mas.upstream_oauth2.register.provider_name", human_name=upstream_oauth_provider.human_name) -}}
</h3>
{% if upstream_oauth_link.human_account_name %}
{% if upstream_oauth_link.human_account_name is not none %}
<p class="account">
{{- upstream_oauth_link.human_account_name -}}
</p>
@@ -147,7 +147,7 @@ Please see LICENSE files in the repository root for full details.
<input {{ field.attributes(f) }} class="cpd-text-control" type="text" value="{{ imported_display_name }}" readonly />
<div class="cpd-form-message cpd-form-help-message">
{% if upstream_oauth_provider.human_name %}
{% if upstream_oauth_provider.human_name is not none %}
{{- _("mas.upstream_oauth2.register.imported_from_upstream_with_name", human_name=upstream_oauth_provider.human_name) -}}
{% else %}
{{- _("mas.upstream_oauth2.register.imported_from_upstream") -}}