Skip to content

Commit

Permalink
Fixed some twig deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
parijke committed Dec 7, 2023
1 parent d2b2bc9 commit aaf12e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions templates/form/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{%- endblock form_group_class %}

{% block anchor_widget %}
{% spaceless %}
{% apply spaceless %}
{% if label is empty %}
{% set label = name|humanize %}
{% endif %}
Expand All @@ -16,11 +16,11 @@
<span class="glyphicon glyphicon-{{ icon }}"{% if icon_inverted|default(false) %} style="color: white;"{% endif %}></span>
{% endif %}
{{ label|trans({}, translation_domain) }}</a>
{% endspaceless %}
{% endapply %}
{% endblock anchor_widget %}

{% block anchor_row %}
{% spaceless %}
{% apply spaceless %}
{% if button_offset is defined and button_offset is not empty %}
{% set attr = attr|merge({'for': id, 'class': button_offset }) %}
<div class="form-group">
Expand All @@ -32,7 +32,7 @@
{{ form_widget(form) }}
</div>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endblock anchor_row %}

{% block ra_role_at_institution_widget %}
Expand All @@ -55,12 +55,12 @@
{% endblock button_group_row %}

{%- block otp_widget -%}
{% spaceless %}
{% apply spaceless %}
<div class="col-sm-9">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-key"></i></span>
<input type="text" class="form-control" {{ block('widget_attributes') }}>
</div>
</div>
{% endspaceless %}
{% endapply %}
{%- endblock otp_widget -%}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<p>
{{ 'ss.registration.registration_email_sent.label.expiration_date'
|trans({'%expirationDate%': expirationDate|localizeddate('full', 'none', locale)}) }}
|trans({'%expirationDate%': expirationDate|format_date('full', 'none', locale)}) }}
</p>

<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions templates/second_factor/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% endif %}
</div>

{% include 'registration/partial:crud_list.html.twig' %}
{% include 'registration/partial/crud_list.html.twig' %}

{% endblock %}

Expand Down Expand Up @@ -62,7 +62,7 @@
<td>{{ secondFactor.secondFactorIdentifier }}</td>
{% if state == 'verified' %}
<td>
{{ expirationHelper.expiresAt(secondFactor.registrationRequestedAt)|format_datetime('full', 'none', locale) }}
{{ expirationHelper.expiresAt(secondFactor.registrationRequestedAt)|format_date('full', 'none', locale) }}
{% if expirationHelper.hasExpired(secondFactor.registrationRequestedAt) %}
{% set hasExpired = true %}
<span class="label label-danger">{{ 'ss.second_factor_list.header.expired_warning'|trans }}</span>
Expand Down

0 comments on commit aaf12e6

Please sign in to comment.