From 151e71b4d94d5156a97a930647316277a871612c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 13 Oct 2022 14:23:46 +0200 Subject: [PATCH] Actually controller is named `dependEnt-select` --- app/views/admin/enterprises/_new_form.html.haml | 6 +++--- .../enterprises/form/_business_address.html.haml | 6 +++--- .../subscriptions/_new_subscription_dialog.html.haml | 4 ++-- app/views/split_checkout/_details.html.haml | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/views/admin/enterprises/_new_form.html.haml b/app/views/admin/enterprises/_new_form.html.haml index 47746fa6ea..5cf78a06cd 100644 --- a/app/views/admin/enterprises/_new_form.html.haml +++ b/app/views/admin/enterprises/_new_form.html.haml @@ -87,16 +87,16 @@ = af.text_field :city, { placeholder: t(:city_placeholder)} .five.columns.omega = af.text_field :zipcode, { placeholder: t(:postcode_placeholder)} - %div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states } + %div{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states } .row .three.columns.alpha = af.label :state_id, t(:state) \/ = af.label :country_id, t(:country) .four.columns - = af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" } + = af.select :country_id, available_countries.map { |c| [c.name, c.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" } .five.columns.omega - = af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" } + = af.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" } .row .three.columns.alpha = af.label :latitude, t(:latitude) diff --git a/app/views/admin/enterprises/form/_business_address.html.haml b/app/views/admin/enterprises/form/_business_address.html.haml index b36c44f5cb..750b2aec03 100644 --- a/app/views/admin/enterprises/form/_business_address.html.haml +++ b/app/views/admin/enterprises/form/_business_address.html.haml @@ -29,11 +29,11 @@ = bf.label :country_id, t(:country) \/ = bf.label :state_id, t(:state) - %div{"data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states } + %div{"data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states } .four.columns - = bf.select :country_id, options_for_select(available_countries.map { |c| [c.name, c.id] }, @enterprise.business_address.country_id), {}, { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" } + = bf.select :country_id, options_for_select(available_countries.map { |c| [c.name, c.id] }, @enterprise.business_address.country_id), {}, { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" } .four.columns.omega - = bf.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependant-select-target": "select", class: "primary" } + = bf.select :state_id, @enterprise.address.country.states.map { |s| [s.name, s.id] }, {}, { "data-controller": "tom-select", "data-dependent-select-target": "select", class: "primary" } .row .three.columns.alpha diff --git a/app/views/admin/subscriptions/_new_subscription_dialog.html.haml b/app/views/admin/subscriptions/_new_subscription_dialog.html.haml index dcbfcccd68..241ebd4c46 100644 --- a/app/views/admin/subscriptions/_new_subscription_dialog.html.haml +++ b/app/views/admin/subscriptions/_new_subscription_dialog.html.haml @@ -4,6 +4,6 @@ = form_with url: "/admin/subscriptions/new", method: :get do |f| .text-left.margin-bottom-30 - = select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange", class: "primary" } + = select_tag "subscription[shop_id]", options_from_collection_for_select(@shops, "id", "name"), { "data-controller": "tom-select", "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange", class: "primary" } .text-center - = f.submit "Continue", class: "button red icon-plus" \ No newline at end of file + = f.submit "Continue", class: "button red icon-plus" diff --git a/app/views/split_checkout/_details.html.haml b/app/views/split_checkout/_details.html.haml index 24feef980c..57c26a5767 100644 --- a/app/views/split_checkout/_details.html.haml +++ b/app/views/split_checkout/_details.html.haml @@ -50,16 +50,16 @@ = bill_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") } = f.error_message_on "bill_address.zipcode" - %div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states } + %div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states } - bill_address_country = @order.bill_address.country || DefaultCountry.country %div.checkout-input = bill_address.label :country_id, t("split_checkout.step1.address.country_id.label") - = bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" } + = bill_address.select :country_id, countries, { selected: bill_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" } %div.checkout-input = bill_address.label :state_id, t("split_checkout.step1.address.state_id.label") - = bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependant-select-target": "select" } + = bill_address.select :state_id, states_for_country(bill_address_country), { selected: @order.bill_address&.state_id }, { "data-dependent-select-target": "select" } - if spree_current_user %div.checkout-input @@ -130,16 +130,16 @@ = ship_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") } = f.error_message_on "ship_address.zipcode" - %div{ "data-controller": "dependant-select", "data-dependant-select-options-value": countries_with_states } + %div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states } - ship_address_country = @order.ship_address.country || DefaultCountry.country %div.checkout-input = ship_address.label :country_id, t("split_checkout.step1.address.country_id.label") - = ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependant-select-target": "source", "data-action": "dependant-select#handleSelectChange" } + = ship_address.select :country_id, countries, { selected: ship_address_country.id }, { "data-dependent-select-target": "source", "data-action": "dependent-select#handleSelectChange" } %div.checkout-input = ship_address.label :state_id, t("split_checkout.step1.address.state_id.label") - = ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependant-select-target": "select" } + = ship_address.select :state_id, states_for_country(ship_address_country), { selected: @order.ship_address&.state_id }, { "data-dependent-select-target": "select" } - if spree_current_user %div.checkout-input{ "data-toggle-target": "content", style: "display: #{display_ship_address ? 'block' : 'none'}" }