Fix bug.
This commit is contained in:
parent
947357e73d
commit
786932e75b
|
@ -255,7 +255,7 @@ class Admin::PropertyHiresController < OrbitAdminController
|
||||||
end
|
end
|
||||||
def phire_params
|
def phire_params
|
||||||
p_hire_params = params.require(:p_hire).permit!
|
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)
|
if(property.enable_notes_selector rescue false)
|
||||||
note_texts = ""
|
note_texts = ""
|
||||||
property.notes_selector.each do |index,sub_hash|
|
property.notes_selector.each do |index,sub_hash|
|
||||||
|
|
|
@ -711,7 +711,7 @@ ul.list-unstyled li {
|
||||||
<% custom_field_inputs = {} %>
|
<% custom_field_inputs = {} %>
|
||||||
<% custom_field_type = {"note_for_hire"=>"text_area"} %>
|
<% custom_field_type = {"note_for_hire"=>"text_area"} %>
|
||||||
<% if(property.enable_notes_selector rescue false) %>
|
<% 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 %>
|
<% end %>
|
||||||
<% fields_name = property.get_all_fields %>
|
<% fields_name = property.get_all_fields %>
|
||||||
<% has_p_hire_fields = property.p_hire_fields_enabled.count != 0
|
<% has_p_hire_fields = property.p_hire_fields_enabled.count != 0
|
||||||
|
|
Loading…
Reference in New Issue