Fix Error
This commit is contained in:
parent
7080cf7d4d
commit
eb8b951253
|
@ -36,7 +36,11 @@
|
||||||
end
|
end
|
||||||
fields_name = fields_name - basic_keys
|
fields_name = fields_name - basic_keys
|
||||||
keys = basic_keys + fields_name
|
keys = basic_keys + fields_name
|
||||||
keys = keys.select{|field_name| tmp = property[field_name]; (tmp.is_a?(Hash) ? (tmp["enable"] == "1") : true) }
|
keys = keys.select do |field_name|
|
||||||
|
return true if field_name.include?('p_hire_fields.')
|
||||||
|
tmp = property[field_name]
|
||||||
|
tmp.is_a?(Hash) ? (tmp["enable"] == "1") : true
|
||||||
|
end
|
||||||
p_hire_fields = property.p_hire_fields_enabled.map{|rf| [rf.id.to_s,rf]}.to_h
|
p_hire_fields = property.p_hire_fields_enabled.map{|rf| [rf.id.to_s,rf]}.to_h
|
||||||
has_p_hire_fields = p_hire_fields.count != 0
|
has_p_hire_fields = p_hire_fields.count != 0
|
||||||
tmp_keys = []
|
tmp_keys = []
|
||||||
|
|
|
@ -797,12 +797,12 @@
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
<% if property.p_hire_start_time %>
|
<% if property.p_open_start_time %>
|
||||||
$("#p_hire_start_time").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_start_time").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
||||||
$("#p_hire_end_time").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_end_time").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
||||||
$("#p_hire_recurring_end_date").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_recurring_end_date").datepicker('option', 'minDate', new Date("<%= property.p_open_start_time.strftime("%Y-%m-%d") %>"));
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if property.p_hire_end_time %>
|
<% if property.p_open_end_time %>
|
||||||
$("#p_hire_start_time").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_start_time").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
||||||
$("#p_hire_end_time").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_end_time").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
||||||
$("#p_hire_recurring_end_date").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
$("#p_hire_recurring_end_date").datepicker('option', 'maxDate', new Date("<%= property.p_open_end_time.strftime("%Y-%m-%d") %>"));
|
||||||
|
|
Loading…
Reference in New Issue