diff --git a/app/views/admin/standing_orders/_details.html.haml b/app/views/admin/standing_orders/_details.html.haml index 96fbb5f418..10d6125dbe 100644 --- a/app/views/admin/standing_orders/_details.html.haml +++ b/app/views/admin/standing_orders/_details.html.haml @@ -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   diff --git a/config/locales/en.yml b/config/locales/en.yml index 99c35843e7..ed513e13a6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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