Fix bug.
This commit is contained in:
parent
2a2121a7c8
commit
912956b65a
|
@ -725,6 +725,7 @@ ul.list-unstyled li {
|
||||||
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
|
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<% rf = p_hire_fields[field_name.sub("p_hire_fields.",'')] %>
|
<% rf = p_hire_fields[field_name.sub("p_hire_fields.",'')] %>
|
||||||
|
<% next if rf.nil? %>
|
||||||
<%= rf.block_helper(property,@form_index,false,"p_hire",hire, rf.to_require,label_col) %>
|
<%= rf.block_helper(property,@form_index,false,"p_hire",hire, rf.to_require,label_col) %>
|
||||||
</div>
|
</div>
|
||||||
<% @form_index = @form_index +1 %>
|
<% @form_index = @form_index +1 %>
|
||||||
|
|
|
@ -36,13 +36,22 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @property.custom_field_names.each_with_index do |field_name,i| %>
|
<% @property.custom_field_names.each_with_index do |field_name,i| %>
|
||||||
|
<% p_hire_field = nil
|
||||||
|
if field_name.include?("p_hire_fields") %>
|
||||||
|
p_hire_field = p_hire_fields[field_name.sub("p_hire_fields.",'')]
|
||||||
|
next if p_hire_field.nil?
|
||||||
|
end %>
|
||||||
<tr data-index="<%=i%>">
|
<tr data-index="<%=i%>">
|
||||||
<td><span class="brand"><i class="icons-list-2"></i></span></td>
|
<td><span class="brand"><i class="icons-list-2"></i></span></td>
|
||||||
<td class="position-text">
|
<td class="position-text">
|
||||||
<div class="position-text-div" data-value="<%= (i + 1).to_s %>"><%= (i + 1).to_s %></div>
|
<div class="position-text-div" data-value="<%= (i + 1).to_s %>"><%= (i + 1).to_s %></div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= field_name.include?("p_hire_fields") ? p_hire_fields[field_name.sub("p_hire_fields.",'')].title : @property.custom_text(field_name) %>
|
<% if p_hire_field %>
|
||||||
|
<%= p_hire_field.title %>
|
||||||
|
<% else %>
|
||||||
|
<%= @property.custom_text(field_name) %>
|
||||||
|
<% end %>
|
||||||
<%= hidden_field_tag "#{f.object_name}[custom_field_names][]", field_name %>
|
<%= hidden_field_tag "#{f.object_name}[custom_field_names][]", field_name %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -568,6 +568,7 @@
|
||||||
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
|
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<% rf = p_hire_fields[field_name.sub("p_hire_fields.",'')] %>
|
<% rf = p_hire_fields[field_name.sub("p_hire_fields.",'')] %>
|
||||||
|
<% next if rf.nil? %>
|
||||||
<%= rf.block_helper(property,@form_index,false,"p_hire",hire, rf.to_require,label_col) %>
|
<%= rf.block_helper(property,@form_index,false,"p_hire",hire, rf.to_require,label_col) %>
|
||||||
</div>
|
</div>
|
||||||
<% @form_index = @form_index +1 %>
|
<% @form_index = @form_index +1 %>
|
||||||
|
|
Loading…
Reference in New Issue