This commit is contained in:
BoHung Chiu 2022-07-07 17:43:46 +08:00
parent b876ba797c
commit 4e1ade20b0
2 changed files with 7 additions and 3 deletions

View File

@ -273,9 +273,13 @@
</thead>
<tbody>
<% @custom_set.each_with_index do |attr_custom,custom_index| %>
<%
seminar_signup_field = SeminarSignupField.where(id:attr_custom.seminar_signup_field_id).first
next if seminar_signup_field.nil?
%>
<tr>
<td>
<%= SeminarSignupField.where(id:attr_custom.seminar_signup_field_id).first.title rescue '' %>
<%= seminar_signup_field.title rescue '' %>
</td>
<td>
<input type="hidden" class="field_set" name='<%= "seminar_main[seminar_signup_field_customs][#{custom_index}][hidden]" %>' value="false">

View File

@ -22,7 +22,7 @@
<% @field_name_translations << t(th) %>
<% end %>
<% end %>
<% if @seminar.seminar_signup_field_customs.count != 0 %>
<% if false #@seminar.seminar_signup_field_customs.count != 0 %>
<% @seminar.seminar_signup_field_customs.each do |field_set| %>
<% s = SeminarSignupField.where(id:field_set.seminar_signup_field_id).first %>
<% title = s.title rescue '' %>
@ -104,7 +104,7 @@
<% end %>
<% end %>
<% seminar_signup_field_customs = SeminarSignupFieldCustom.all.map{|field_set| SeminarSignupField.where(id: field_set.seminar_signup_field_id).first}.select{|s| !s.nil?}.uniq{|s| s.key } %>
<% if seminar_signup_field_customs.count != 0 %>
<% if false #seminar_signup_field_customs.count != 0 %>
<% seminar_signup_field_customs.each do |s| %>
<% title = s.title rescue '' %>
<% next if title.blank? %>