jenkins-bot has submitted this change and it was merged. Change subject: Distingush debit cards with text under logo ......................................................................
Distingush debit cards with text under logo Not the most beautiful solution, but it translates. Bug: T124320 Change-Id: I319f41c393bab37982d7baa2704a2ceb9576a6c9 --- M astropay_gateway/astropay.adapter.php M gateway_common/i18n/interface/en.json M gateway_common/i18n/interface/es.json M gateway_common/i18n/interface/qqq.json M gateway_forms/Mustache.php D gateway_forms/includes/card-visa-debit.png M gateway_forms/mustache/forms.css M gateway_forms/mustache/payment_method.html.mustache 8 files changed, 31 insertions(+), 4 deletions(-) Approvals: AndyRussG: Looks good to me, approved jenkins-bot: Verified diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 3584f52..f3f2105 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -343,7 +343,8 @@ 'countries' => array( 'MX' => true, ), - 'logo' => 'card-visa-debit.png', + 'logo' => 'card-visa-lg.png', + 'sub_text_key' => 'donate_interface-debit', ); // MasterCard debit @@ -354,6 +355,8 @@ 'countries' => array( 'MX' => true, ), + 'logo' => 'card-mc-lg.png', + 'sub_text_key' => 'donate_interface-debit', ); // Elo (Brazil-only) diff --git a/gateway_common/i18n/interface/en.json b/gateway_common/i18n/interface/en.json index 141222e..217ede6 100644 --- a/gateway_common/i18n/interface/en.json +++ b/gateway_common/i18n/interface/en.json @@ -307,6 +307,7 @@ "donate_interface-cvv-number": "CVV number", "donate_interface-verification-number": "Verification number", "donate_interface-what-is-this": "What is this?", + "donate_interface-debit": "debit", "donate_interface-do-not-include-dashes": "Please do not include dashes", "donate_interface-please-donate-today": "Please donate today", "donate_interface-donate-now": "Donate now", diff --git a/gateway_common/i18n/interface/es.json b/gateway_common/i18n/interface/es.json index 4dd87e6..43d68fb 100644 --- a/gateway_common/i18n/interface/es.json +++ b/gateway_common/i18n/interface/es.json @@ -315,6 +315,7 @@ "donate_interface-cvv-number": "Número CVV", "donate_interface-verification-number": "Número de verificación", "donate_interface-what-is-this": "¿Qué es esto?", + "donate_interface-debit": "débito", "donate_interface-do-not-include-dashes": "No incluyas guiones", "donate_interface-please-donate-today": "Haz una donación hoy", "donate_interface-donate-now": "Dona ahora", diff --git a/gateway_common/i18n/interface/qqq.json b/gateway_common/i18n/interface/qqq.json index 06ca161..85ccd8e 100644 --- a/gateway_common/i18n/interface/qqq.json +++ b/gateway_common/i18n/interface/qqq.json @@ -332,6 +332,7 @@ "donate_interface-cvv-number": "Abbreviation of 'Card Verification Value' + 'Number' (unabbreviated)", "donate_interface-verification-number": "Prompt for the card's verification number", "donate_interface-what-is-this": "{{Identical|What is this}}", + "donate_interface-debit": "Text to indicate that the choice is a debit card as distinct from a credit card. Maximum width is 8em.", "donate_interface-do-not-include-dashes": "Reminder to exclude dashes from entries", "donate_interface-please-donate-today": "Label for request urging donation", "donate_interface-donate-now": "Label for button to donate", diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php index 7f22936..1ea1f91 100644 --- a/gateway_forms/Mustache.php +++ b/gateway_forms/Mustache.php @@ -98,6 +98,9 @@ if ( isset( $submethod['logo'] ) ) { $submethod['logo'] = "{$data['script_path']}/extensions/DonationInterface/gateway_forms/includes/{$submethod['logo']}"; } + if ( isset( $submethod['sub_text_key'] ) ) { + $submethod['has_sub_text'] = true; + } $data['submethods'][] = $submethod; } diff --git a/gateway_forms/includes/card-visa-debit.png b/gateway_forms/includes/card-visa-debit.png deleted file mode 100644 index 5480719..0000000 --- a/gateway_forms/includes/card-visa-debit.png +++ /dev/null Binary files differ diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css index 4d065b9..dc26aa9 100644 --- a/gateway_forms/mustache/forms.css +++ b/gateway_forms/mustache/forms.css @@ -305,7 +305,9 @@ } #cards.four-per-line > li:nth-child(4), #cards.four-per-line > li:nth-child(8) { margin-right: 0; } - +#cards li.has_sub_text { + padding-bottom: 0.1em; +} #cards.enabled li:hover { background: #bcbcbc; } @@ -330,7 +332,15 @@ margin: 0 auto !important; height: auto !important; } - +#cards li.has_sub_text label { + margin-top: 0; +} +#cards li.has_sub_text input { + margin-bottom: 0.1em !important; +} +#cards li label p.card_sub_text { + margin: -0.5em auto; +} #paymentContinue, #paymentSubmit { margin-top: 1em !important; clear: both; diff --git a/gateway_forms/mustache/payment_method.html.mustache b/gateway_forms/mustache/payment_method.html.mustache index 6431e76..6cd6a25 100644 --- a/gateway_forms/mustache/payment_method.html.mustache +++ b/gateway_forms/mustache/payment_method.html.mustache @@ -5,7 +5,15 @@ {{# show_submethods }} <ul class="options-h enabled {{ button_class }}" id="cards" style="margin: 0;"> {{# submethods }} - <li title="{{ label }}"><input id="submethod-{{ key }}" name="payment_submethod" type="radio" value="{{ key }}" class="cardradio" /> <label for="submethod-{{ key }}"><img alt="{{ label }}" src="{{ logo }}" /></label></li> + <li title="{{ label }}" {{# has_sub_text }}class="has_sub_text" {{/ has_sub_text}}> + <input id="submethod-{{ key }}" name="payment_submethod" type="radio" value="{{ key }}" class="cardradio" /> + <label for="submethod-{{ key }}"> + <img alt="{{ label }}" src="{{ logo }}" /> +{{# has_sub_text }} + <p class="card_sub_text">{{ l10n sub_text_key }}</p> +{{/ has_sub_text }} + </label> + </li> {{/ submethods }} </ul> {{/ show_submethods }} -- To view, visit https://gerrit.wikimedia.org/r/275742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I319f41c393bab37982d7baa2704a2ceb9576a6c9 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com> Gerrit-Reviewer: Awight <awi...@wikimedia.org> Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org> Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits