mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adding payment methods partial to new enterprirse edit screen
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
%legend Shipping Methods
|
||||
= render 'admin/enterprises/form/shipping_methods', f: f
|
||||
|
||||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Payment Methods'" } }
|
||||
%legend Payment Methods
|
||||
= render 'admin/enterprises/form/payment_methods', f: f
|
||||
|
||||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Enterprise Fees'" } }
|
||||
%legend Enterprise Fees
|
||||
= render 'admin/enterprises/form/enterprise_fees', f: f
|
||||
|
||||
33
app/views/admin/enterprises/form/_payment_methods.html.haml
Normal file
33
app/views/admin/enterprises/form/_payment_methods.html.haml
Normal file
@@ -0,0 +1,33 @@
|
||||
- if @payment_methods.count > 0
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Applies?
|
||||
%th
|
||||
%tbody
|
||||
- @payment_methods.each do |payment_method|
|
||||
%tr{ ng: { controller: 'paymentMethodCtrl', init: "findPaymentMethodByID(#{payment_method.id})" } }
|
||||
%td= payment_method.name
|
||||
%td= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
|
||||
%td= link_to "Edit", edit_admin_payment_method_path(payment_method)
|
||||
%br
|
||||
.row
|
||||
.six.columns.alpha
|
||||
%a.button{ href: "#{admin_payment_methods_path}"}
|
||||
Manage Payment Methods
|
||||
%i.icon-arrow-right
|
||||
.five.columns.omega.text-right
|
||||
%a.button{ href: "#{new_admin_payment_method_path}"}
|
||||
Create New Payment Method
|
||||
%i.icon-plus
|
||||
|
||||
- else
|
||||
%p.text-center
|
||||
You don't have any payment methods yet.
|
||||
|
||||
%br
|
||||
.text-center
|
||||
%a.button{ href: "#{new_admin_payment_method_path}"}
|
||||
Create One Now
|
||||
%i.icon-arrow-right
|
||||
Reference in New Issue
Block a user