From c626b1b0ad23abb0394f12510c1df6a028569bd4 Mon Sep 17 00:00:00 2001 From: Jumana Bahrainwala Date: Wed, 4 Dec 2024 16:47:03 +0000 Subject: [PATCH] Set annual limits to read from the DB --- app/templates/views/service-settings.html | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 84c63a522..0725630de 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -192,12 +192,7 @@

{{ _('Your service is in trial mode') }}

{% call settings_row(if_has_permission='email') %} {% set txt = _('Annual maximum
(April 1 to March 31)') %} {{ text_field(txt) }} - {# TODO: FF_ANNUAL_LIMIT removal #} - {% if config["FF_ANNUAL_LIMIT"] %} - {% set annual_limit = _('{} emails').format((current_service.email_annual_limit) | format_number) %} - {% else %} - {% set annual_limit = _('{} million emails').format((limits.free_yearly_email//1000000) | format_number) %} - {% endif%} + {% set annual_limit = _('{} emails').format((current_service.email_annual_limit) | format_number) %} {{ text_field(annual_limit, attributes="data-testid=email-annual-limit") }} {{ text_field('')}} {% endcall %} @@ -271,12 +266,7 @@

{{ _('Your service is in trial mode') }}

{% call settings_row(if_has_permission='sms') %} {% set txt = _('Annual maximum
(April 1 to March 31)') %} {{ text_field(txt) }} - {# TODO: FF_ANNUAL_LIMIT removal #} - {% if config["FF_ANNUAL_LIMIT"] %} - {% set annual_sms_limit = _('{} text messages').format((current_service.sms_annual_limit) | format_number) %} - {% else %} - {% set annual_sms_limit = _('{} text messages').format((limits.free_yearly_sms) | format_number) %} - {% endif%} + {% set annual_sms_limit = _('{} text messages').format((current_service.sms_annual_limit) | format_number) %} {{ text_field(annual_sms_limit, attributes="data-testid=sms-annual-limit") }} {{ text_field('')}} {% endcall %} @@ -383,8 +373,6 @@

{{ _('Platform admin settings') }}

) }} {% endcall %} - {# TODO: FF_ANNUAL_LIMIT removal #} - {% if config["FF_ANNUAL_LIMIT"] %} {% call row() %} {% set txt = _('Annual email limit') %} {{ text_field(txt)}} @@ -408,7 +396,6 @@

{{ _('Platform admin settings') }}

for=txt ) }} {% endcall %} - {% endif %} {% call row() %} {% set txt = _('API rate limit per minute') %}