Skip to content

Commit

Permalink
Implement VAR for C24_WMDE_Desktop_DE_10
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Sperling-0 authored and gbirke committed Nov 4, 2024
1 parent 3144b2d commit a3dfbbd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion banners/desktop/C24_WMDE_Desktop_DE_10/banner_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
21 changes: 21 additions & 0 deletions banners/desktop/C24_WMDE_Desktop_DE_10/form_items_var.ts
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit a3dfbbd

Please sign in to comment.