templates: fix reliance on lax undefined behaviour
This commit is contained in:
@@ -28,7 +28,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
{{ captcha.head() }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout-container{% if consent_page %} consent{% endif %}">
|
||||
<div class="layout-container{% if consent_page is defined %} consent{% endif %}">
|
||||
{% block content %}{% endblock content %}
|
||||
{% include "components/footer.html" %}
|
||||
</div>
|
||||
|
||||
@@ -7,19 +7,19 @@ Please see LICENSE files in the repository root for full details.
|
||||
-#}
|
||||
|
||||
<footer class="legal-footer">
|
||||
{%- if branding.policy_uri or branding.tos_uri -%}
|
||||
{%- if branding.policy_uri is defined or branding.tos_uri is defined -%}
|
||||
<nav>
|
||||
{%- if branding.policy_uri -%}
|
||||
{%- if branding.policy_uri is defined -%}
|
||||
<a href="{{ branding.policy_uri }}" referrerpolicy="no-referrer" title="{{ _('branding.privacy_policy.alt') }}" class="cpd-link" data-kind="primary">
|
||||
{{- _("branding.privacy_policy.link") -}}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.policy_uri and branding.tos_uri -%}
|
||||
{%- if branding.policy_uri is defined and branding.tos_uri is defined -%}
|
||||
<div class="separator" aria-hidden="true">•</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.tos_uri -%}
|
||||
{%- if branding.tos_uri is defined -%}
|
||||
<a href="{{ branding.tos_uri }}" referrerpolicy="no-referrer" title="{{ _('branding.terms_and_conditions.alt') }}" class="cpd-link" data-kind="primary">
|
||||
{{- _("branding.terms_and_conditions.link") -}}
|
||||
</a>
|
||||
@@ -27,7 +27,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
</nav>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if branding.imprint -%}
|
||||
{%- if branding.imprint is defined -%}
|
||||
<p class="imprint">{{ branding.imprint }}</p>
|
||||
{%- endif -%}
|
||||
</footer>
|
||||
|
||||
@@ -49,7 +49,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
<input {{ field.attributes(f) }} class="cpd-text-control" type="password" autocomplete="new-password" required />
|
||||
{% endcall %}
|
||||
|
||||
{% if branding.tos_uri %}
|
||||
{% if branding.tos_uri is defined %}
|
||||
{% call(f) field.field(label=_("mas.register.terms_of_service", tos_uri=branding.tos_uri), name="accept_terms", form_state=form, inline=true, class="my-4") %}
|
||||
<div class="cpd-form-inline-field-control">
|
||||
<div class="cpd-checkbox-container">
|
||||
|
||||
@@ -175,7 +175,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if branding.tos_uri %}
|
||||
{% if branding.tos_uri is defined %}
|
||||
{% call(f) field.field(label=_("mas.register.terms_of_service", tos_uri=branding.tos_uri), name="accept_terms", form_state=form_state, inline=true, class="my-4") %}
|
||||
<div class="cpd-form-inline-field-control">
|
||||
<div class="cpd-checkbox-container">
|
||||
|
||||
Reference in New Issue
Block a user