mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Remove data-hooks
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
= admin_inject_json "admin.payments", "currentOrderNumber", @order.number
|
||||
= admin_inject_json_ams_array "admin.payments", "paymentMethods", @payment_methods, Api::PaymentMethodSerializer, current_order: @order
|
||||
|
||||
.row{"data-hook" => "admin_payment_form_fields"}
|
||||
.row
|
||||
.alpha.three.columns
|
||||
.field
|
||||
= f.label :amount, t(:amount)
|
||||
@@ -12,7 +12,7 @@
|
||||
%ul
|
||||
- @payment_methods.each do |method|
|
||||
%li
|
||||
%label{"data-hook" => "payment_method_field"}
|
||||
%label
|
||||
= radio_button_tag 'payment[payment_method_id]', method.id, method == @payment_method, { class: "payment_methods_radios", "ng-model" => 'form_data.payment_method' }
|
||||
= t(method.name, scope: :payment_methods, default: method.name)
|
||||
.payment-method-settings
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
%save-bar{ persist: "true" }
|
||||
%fieldset.no-border-top
|
||||
= render partial: 'form', locals: { f: f }
|
||||
.filter-actions.actions{"data-hook" => "buttons"}
|
||||
.filter-actions.actions
|
||||
= button_tag t(:update), type: 'button', "ng-click" => "submitPayment()"
|
||||
|
||||
- else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%fieldset.no-border-bottom
|
||||
.field{"data-hook" => "previous_cards"}
|
||||
.field
|
||||
- @previous_cards.each do |card|
|
||||
%label
|
||||
= radio_button_tag :card, card.id, card == @previous_cards.first
|
||||
@@ -8,11 +8,11 @@
|
||||
%label
|
||||
= radio_button_tag :card, 'new', @previous_cards.none?, { class: "card_new" }
|
||||
= t(:use_new_cc)
|
||||
.card_form{"data-hook" => ""}
|
||||
.card_form
|
||||
- param_prefix = "payment_source[#{payment_method.id}]"
|
||||
.clear
|
||||
.alpha.four.columns
|
||||
%div{"data-hook" => "card_number"}
|
||||
%div
|
||||
.field
|
||||
= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'}
|
||||
= label_tag "card_number#{payment_method.id}", raw(t(:card_number) + content_tag(:span, ' *', class: 'required'))
|
||||
@@ -25,17 +25,17 @@
|
||||
%span#unrecognized= t(:unrecognized_card_type)
|
||||
)
|
||||
.alpha.four.columns
|
||||
%div{"data-hook" => "card_name"}
|
||||
%div
|
||||
.field
|
||||
= label_tag "card_name#{payment_method.id}", raw(t(:name) + content_tag(:span, ' *', class: 'required'))
|
||||
= text_field_tag "#{param_prefix}[name]", '', id: "card_name#{payment_method.id}", class: 'required fullwidth', maxlength: 19
|
||||
.three.columns
|
||||
.field{"data-hook" => "card_expiration"}
|
||||
.field
|
||||
= label_tag "card_expiry#{payment_method.id}", raw(t(:expiration) + content_tag(:span, ' *', class: 'required'))
|
||||
%br/
|
||||
= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry", placeholder: "MM / YY"
|
||||
.omega.two.columns
|
||||
.field{"data-hook" => "card_code"}
|
||||
.field
|
||||
= label_tag "card_code#{payment_method.id}", raw(t(:card_code) + content_tag(:span, ' *', class: "required"))
|
||||
= text_field_tag "#{param_prefix}[verification_value]", '', id: "card_code#{payment_method.id}", class: 'required fullwidth cardCode', size: 5
|
||||
%a.info.cvvLink{href: "/content/cvv", target: "_blank"}
|
||||
|
||||
Reference in New Issue
Block a user