From 29bc4c52a5e2e6d55738c1e28f36d37f512c3224 Mon Sep 17 00:00:00 2001 From: Hugo Daniel Date: Thu, 29 Nov 2018 14:13:24 +0100 Subject: [PATCH] Import payment_methods#new view and apply overrides --- .../new/add_hubs_sidebar.html.haml.deface | 5 ----- .../new/remove_configuration_sidebar.deface | 1 - .../spree/admin/payment_methods/new.html.haml | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 app/overrides/spree/admin/payment_methods/new/add_hubs_sidebar.html.haml.deface delete mode 100644 app/overrides/spree/admin/payment_methods/new/remove_configuration_sidebar.deface create mode 100644 app/views/spree/admin/payment_methods/new.html.haml diff --git a/app/overrides/spree/admin/payment_methods/new/add_hubs_sidebar.html.haml.deface b/app/overrides/spree/admin/payment_methods/new/add_hubs_sidebar.html.haml.deface deleted file mode 100644 index 26ee2888bd..0000000000 --- a/app/overrides/spree/admin/payment_methods/new/add_hubs_sidebar.html.haml.deface +++ /dev/null @@ -1,5 +0,0 @@ -/ insert_after "code[erb-loud]:contains(\"render :partial => 'form', :locals => { :f => f }\")" - -.one.column   -= render :partial => 'spree/admin/shared/hubs_sidebar', :locals => { f: f, klass: :payment_method } -.clear \ No newline at end of file diff --git a/app/overrides/spree/admin/payment_methods/new/remove_configuration_sidebar.deface b/app/overrides/spree/admin/payment_methods/new/remove_configuration_sidebar.deface deleted file mode 100644 index cc3fbcdee1..0000000000 --- a/app/overrides/spree/admin/payment_methods/new/remove_configuration_sidebar.deface +++ /dev/null @@ -1 +0,0 @@ -remove "code[erb-loud]:contains(\"render :partial => 'spree/admin/shared/configuration_menu'\")" \ No newline at end of file diff --git a/app/views/spree/admin/payment_methods/new.html.haml b/app/views/spree/admin/payment_methods/new.html.haml new file mode 100644 index 0000000000..8a05230dfe --- /dev/null +++ b/app/views/spree/admin/payment_methods/new.html.haml @@ -0,0 +1,14 @@ +- content_for :page_title do + = t(:new_payment_method) +- content_for :page_actions do + %li + = button_link_to t(:back_to_payment_methods_list), admin_payment_methods_path, icon: 'icon-arrow-left' += render partial: 'spree/shared/error_messages', locals: { target: @payment_method } += form_for @payment_method, url: collection_url do |f| + %fieldset.no-border-top + = render partial: 'form', locals: { f: f } + .one.column   + = render partial: 'spree/admin/shared/hubs_sidebar', locals: { f: f, klass: :payment_method } + .clear + .filter-actions.actions + = button t(:create), 'icon-ok'