This commit is contained in:
BoHung Chiu 2022-06-21 11:39:36 +08:00
parent 92b3b91138
commit dba2944273
1 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class Property
field :hiring_person_number, type: Hash, default: {"enable"=>"1","required"=>"true"}
field :hiring_person_name, type: Hash, default: {"enable"=>"1","required"=>"true"}
field :reason_for_hire, type: Hash, default: {"enable"=>"1","required"=>"true"}
field :note_for_hire
field :note_for_hire, type: Hash, default: {"enable"=>"1","required"=>"false"}
field :organization
field :person_in_charge
field :tel_of_person_in_charge
@ -498,7 +498,8 @@ class Property
end
form_index = form_index +1
else
if self.send(field_name)["required"] == "true" && booking_p[field_name].blank?
field_setting = self.send(field_name)
if field_setting && field_setting["required"] == "true" && booking_p[field_name].blank?
error_messages += "#{self.custom_text(field_name,"name")}: #{unfilled_text}\n"
end
end