From a3dfbbd48c6815b551938a9e3524c31dbcdff6ed Mon Sep 17 00:00:00 2001 From: Sperling-0 Date: Sat, 2 Nov 2024 09:59:00 +0100 Subject: [PATCH] Implement VAR for C24_WMDE_Desktop_DE_10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The payment intervals "vierteljährlich" (quarterly) and "jährlich" are removed - The font size of the radio button labels and the custom amount placeholder is increased to 1em - The custom amount placeholder is changed from "Wunschbetrag" to "Wahlbetrag" - The size of the radio buttons is slightly increased (+2px for each dimension) Ticket: https://phabricator.wikimedia.org/T378803 --- .../C24_WMDE_Desktop_DE_10/banner_var.ts | 2 +- .../C24_WMDE_Desktop_DE_10/form_items_var.ts | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 banners/desktop/C24_WMDE_Desktop_DE_10/form_items_var.ts diff --git a/banners/desktop/C24_WMDE_Desktop_DE_10/banner_var.ts b/banners/desktop/C24_WMDE_Desktop_DE_10/banner_var.ts index 10cf85340..2ebfc85e4 100644 --- a/banners/desktop/C24_WMDE_Desktop_DE_10/banner_var.ts +++ b/banners/desktop/C24_WMDE_Desktop_DE_10/banner_var.ts @@ -25,7 +25,7 @@ import messages from './messages'; import { LocaleFactoryDe } from '@src/utils/LocaleFactory/LocaleFactoryDe'; // Channel specific form setup -import { createFormItems } from './form_items'; +import { createFormItems } from './form_items_var'; import { createFormActions } from '@src/createFormActions'; const date = new Date(); diff --git a/banners/desktop/C24_WMDE_Desktop_DE_10/form_items_var.ts b/banners/desktop/C24_WMDE_Desktop_DE_10/form_items_var.ts new file mode 100644 index 000000000..cdd99a20b --- /dev/null +++ b/banners/desktop/C24_WMDE_Desktop_DE_10/form_items_var.ts @@ -0,0 +1,21 @@ +import FormItemsBuilder from '@src/utils/FormItemsBuilder/FormItemsBuilder'; +import { Translator } from '@src/Translator'; +import { DonationFormItems } from '@src/utils/FormItemsBuilder/DonationFormItems'; +import { Intervals } from '@src/utils/FormItemsBuilder/fields/Intervals'; +import { PaymentMethods } from '@src/utils/FormItemsBuilder/fields/PaymentMethods'; +import { NumberFormatter } from '@src/utils/DynamicContent/formatters/NumberFormatter'; + +export function createFormItems( translations: Translator, amountFormatter: NumberFormatter ): DonationFormItems { + return new FormItemsBuilder( translations, amountFormatter ) + .setIntervals( + Intervals.ONCE, + Intervals.MONTHLY + ) + .setAmounts( 5, 10, 20, 25, 50, 100 ) + .setPaymentMethods( + PaymentMethods.PAYPAL, + PaymentMethods.BANK_TRANSFER, + PaymentMethods.CREDIT_CARD, + PaymentMethods.DIRECT_DEBIT + ).getItems(); +}