Skip to content

Commit ea7f568

Browse files
committed
Clarify some more conditions in the templates
1 parent 647c8e7 commit ea7f568

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

templates/form_post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h1 class="title">{{ _("common.loading") }}</h1>
1515
</div>
1616
</header>
1717

18-
<form method="post" class="flex flex-col"{% if redirect_uri %} action="{{ redirect_uri }}"{% endif %}>
18+
<form method="post" class="flex flex-col"{% if redirect_uri is not none %} action="{{ redirect_uri }}"{% endif %}>
1919
{% for key, value in params|items %}
2020
<input type="hidden" name="{{ key }}" value="{{ value }}" />
2121
{% endfor %}

templates/pages/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1 class="title">{{ _("app.human_name") }}</h1>
1919
</div>
2020
</header>
2121

22-
{% if current_session %}
22+
{% if current_session is not none %}
2323
<p class="cpd-text-body-md-regular">
2424
{{ _("mas.navbar.signed_in_as", username=current_session.user.username) }}
2525
</p>

templates/pages/upstream_oauth2/do_register.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1 class="title">
2626
</p>
2727
</div>
2828
</header>
29-
{% elif upstream_oauth_provider.human_name %}
29+
{% elif upstream_oauth_provider.human_name is not none %}
3030
<header class="page-heading">
3131
<div class="icon">
3232
{{ icon.user_profile_solid() }}
@@ -55,9 +55,9 @@ <h1 class="title">
5555
</header>
5656
{% endif %}
5757

58-
{% if upstream_oauth_provider.human_name %}
58+
{% if upstream_oauth_provider.human_name is not none %}
5959
<section class="upstream-oauth2-provider-account">
60-
{% if upstream_oauth_provider.brand_name %}
60+
{% if upstream_oauth_provider.brand_name is not none %}
6161
{{ logo(brand=upstream_oauth_provider.brand_name, class="brand") }}
6262
{% else %}
6363
{{ icon.user_profile() }}
@@ -67,7 +67,7 @@ <h1 class="title">
6767
<h3 class="provider">
6868
{{- _("mas.upstream_oauth2.register.provider_name", human_name=upstream_oauth_provider.human_name) -}}
6969
</h3>
70-
{% if upstream_oauth_link.human_account_name %}
70+
{% if upstream_oauth_link.human_account_name is not none %}
7171
<p class="account">
7272
{{- upstream_oauth_link.human_account_name -}}
7373
</p>
@@ -147,7 +147,7 @@ <h3 class="provider">
147147
<input {{ field.attributes(f) }} class="cpd-text-control" type="text" value="{{ imported_display_name }}" readonly />
148148

149149
<div class="cpd-form-message cpd-form-help-message">
150-
{% if upstream_oauth_provider.human_name %}
150+
{% if upstream_oauth_provider.human_name is not none %}
151151
{{- _("mas.upstream_oauth2.register.imported_from_upstream_with_name", human_name=upstream_oauth_provider.human_name) -}}
152152
{% else %}
153153
{{- _("mas.upstream_oauth2.register.imported_from_upstream") -}}

0 commit comments

Comments
 (0)