mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Add checkbox to clear business_address form
This commit is contained in:
committed by
Nihal M. Kelanthodika
parent
32d8ce78ef
commit
3cd5ed58c0
@@ -60,7 +60,7 @@ class Enterprise < ApplicationRecord
|
||||
delegate :latitude, :longitude, :city, :state_name, to: :address
|
||||
|
||||
accepts_nested_attributes_for :address
|
||||
accepts_nested_attributes_for :business_address
|
||||
accepts_nested_attributes_for :business_address, allow_destroy: true
|
||||
accepts_nested_attributes_for :producer_properties, allow_destroy: true,
|
||||
reject_if: lambda { |pp|
|
||||
pp[:property_name].blank?
|
||||
|
||||
@@ -6,7 +6,7 @@ module PermittedAttributes
|
||||
[
|
||||
:company, :address1, :address2,
|
||||
:city, :country_id, :state_id, :zipcode,
|
||||
:phone
|
||||
:phone, :_destroy
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,3 +39,9 @@
|
||||
= bf.label :phone, t(".legal_phone_number")
|
||||
.eight.columns.omega
|
||||
= bf.text_field :phone, { placeholder: t(".phone_placeholder") }
|
||||
|
||||
.row
|
||||
.three.columns.alpha
|
||||
= bf.label :clear
|
||||
.eight.columns.omega
|
||||
= bf.check_box :_destroy
|
||||
|
||||
Reference in New Issue
Block a user