Show message when no credit cards available for a customer

This commit is contained in:
Rob Harrington
2017-11-02 13:28:50 +11:00
parent 61b64a7516
commit f95d1ef058
2 changed files with 2 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
.three.columns.field{ ng: { show: 'cardRequired' } }
%label{ for: 'credit_card_id'}= t('.credit_card')
%input.ofn-select2.fullwidth#credit_card_id{ name: 'credit_card_id', type: 'number', data: 'creditCards', text: 'formatted', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.credit_card_id' } }
.error{ ng: { show: 'creditCards.length == 0' } }= t('.no_cards_available')
.error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.credit_card_id.$error.required' } }= t(:error_required)
.error{ ng: { repeat: 'error in errors.credit_card', show: 'standing_order_details_form.credit_card_id.$pristine' } } {{ error }}
.two.columns  

View File

@@ -851,6 +851,7 @@ en:
invalid_error: Oops! Please fill in all of the required fields...
allowed_payment_method_types_tip: Only Cash and Stripe payment methods may be used at the moment
credit_card: Credit Card
no_cards_available: No cards available
product_already_in_order: This product has already been added to the order. Please edit the quantity directly.
orders:
number: Number