From 370a108b3d44d3a87181b7ed9f52fcc246a2b796 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Mon, 1 Feb 2021 18:00:28 +0100 Subject: [PATCH] Add stripe account owner selector as a new row Otherwise, not displayed. --- .../payment_methods/_stripe_connect.html.haml | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/views/spree/admin/payment_methods/_stripe_connect.html.haml b/app/views/spree/admin/payment_methods/_stripe_connect.html.haml index 76323e0862..891aa71b48 100644 --- a/app/views/spree/admin/payment_methods/_stripe_connect.html.haml +++ b/app/views/spree/admin/payment_methods/_stripe_connect.html.haml @@ -3,16 +3,17 @@ = t(:provider_settings) .preference-settings{ ng: { controller: "StripeController" } } = fields_for :payment_method, @payment_method do |payment_method_form| - .alpha.four.columns - = payment_method_form.label :stripe_account_owner - .omega.twelve.columns - - if @stripe_account_holder.nil? || spree_current_user.enterprises.include?(@stripe_account_holder) - %input.ofn-select2.fullwidth#payment_method_preferred_enterprise_id{ type: 'number', - name: 'payment_method[preferred_enterprise_id]', - placeholder: t(".enterprise_select_placeholder"), - data: 'shops', ng: { model: 'paymentMethod.preferred_enterprise_id' } } - - else - %strong= Enterprise.find_by(id: @payment_method).andand.name + .row + .alpha.four.columns + = payment_method_form.label :stripe_account_owner + .omega.twelve.columns + - if @stripe_account_holder.nil? || spree_current_user.enterprises.include?(@stripe_account_holder) + %input.ofn-select2.fullwidth#payment_method_preferred_enterprise_id{ type: 'number', + name: 'payment_method[preferred_enterprise_id]', + placeholder: t(".enterprise_select_placeholder"), + data: 'shops', ng: { model: 'paymentMethod.preferred_enterprise_id' } } + - else + %strong= Enterprise.find_by(id: @payment_method).andand.name #stripe-account-status{ ng: { show: "paymentMethod.preferred_enterprise_id" } } .alert-box.warning{ ng: { hide: "stripe_account.status" } }