From e34afe1ee6787806060cccc351df565e5921f02f Mon Sep 17 00:00:00 2001 From: Tchama Date: Sat, 5 Sep 2020 15:38:41 +0200 Subject: [PATCH] fix twig date and currency filter deprecation --- Resources/views/Element/index.html.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/views/Element/index.html.twig b/Resources/views/Element/index.html.twig index b531cd9d7..18c6ad5e6 100644 --- a/Resources/views/Element/index.html.twig +++ b/Resources/views/Element/index.html.twig @@ -56,12 +56,12 @@ {{ f.type|budget_element_type_display(family) }} - {{ f.amount|localizedcurrency('EUR') }} + {{ f.amount|format_currency('EUR') }} {% if f.endDate is not null %} - {{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|localizeddate('long', 'none'), '%endDate%': f.endDate|localizeddate('long', 'none') } ) }} + {{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none'), '%endDate%': f.endDate|format_date('long', 'none') } ) }} {% else %} - {{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|localizeddate('long', 'none') } ) }} + {{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|format_date('long', 'none') } ) }} {% endif %} @@ -90,7 +90,7 @@ {{ 'Total'|trans }} - {{ total|localizedcurrency('EUR') }} + {{ total|format_currency('EUR') }}     @@ -113,7 +113,7 @@ {{ result.label }} {% if result.type == constant('CHILL\\AMLI\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_CURRENCY') %} - {{ result.result|localizedcurrency('EUR') }} + {{ result.result|format_currency('EUR') }} {% elseif result.type == constant('CHILL\\AMLI\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_PERCENTAGE') %} {{ result.result|round(2, 'ceil') ~ '%' }} {% else %}