This commit is contained in:
BoHung Chiu 2021-09-23 14:40:18 +08:00
parent 2a2121a7c8
commit 912956b65a
3 changed files with 12 additions and 1 deletions

View File

@ -725,6 +725,7 @@ ul.list-unstyled li {
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
<div class="form-group">
<% 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) %>
</div>
<% @form_index = @form_index +1 %>

View File

@ -36,13 +36,22 @@
</thead>
<tbody>
<% @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%>">
<td><span class="brand"><i class="icons-list-2"></i></span></td>
<td class="position-text">
<div class="position-text-div" data-value="<%= (i + 1).to_s %>"><%= (i + 1).to_s %></div>
</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 %>
</td>
</tr>

View File

@ -568,6 +568,7 @@
<% if has_p_hire_fields && field_name.include?("p_hire_fields") %>
<div class="form-group">
<% 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) %>
</div>
<% @form_index = @form_index +1 %>