This commit is contained in:
BoHung Chiu 2023-04-22 12:57:02 +08:00
parent 947357e73d
commit 786932e75b
2 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ class Admin::PropertyHiresController < OrbitAdminController
end
def phire_params
p_hire_params = params.require(:p_hire).permit!
property = Property.find(params[:p_hire][:property_id]) rescue Property.last
property = (@phire ? @phire.property : Property.find(params[:p_hire][:property_id]) rescue nil)
if(property.enable_notes_selector rescue false)
note_texts = ""
property.notes_selector.each do |index,sub_hash|

View File

@ -711,7 +711,7 @@ ul.list-unstyled li {
<% custom_field_inputs = {} %>
<% custom_field_type = {"note_for_hire"=>"text_area"} %>
<% if(property.enable_notes_selector rescue false) %>
<% custom_field_inputs["note_for_hire"] = render(:partial=>"notes_selector",:locals=>{:f=>f,:property=>property}) %>
<% custom_field_inputs["note_for_hire"] = render(:partial=>"property_hires/notes_selector",:locals=>{:f=>f,:property=>property}) %>
<% end %>
<% fields_name = property.get_all_fields %>
<% has_p_hire_fields = property.p_hire_fields_enabled.count != 0