fixes
This commit is contained in:
parent
5357306c92
commit
de407b718f
|
@ -7,7 +7,12 @@ class CurationPostSection
|
|||
field :section_type
|
||||
field :text, localize: true
|
||||
field :universal_table
|
||||
field :table_entries, type: Array, default: []
|
||||
field :table_entries
|
||||
|
||||
belongs_to :curation_post
|
||||
|
||||
def get_table_entries
|
||||
tids = self.table_entries.split(',')
|
||||
TableEntry.find(tids)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<span class="tab-content section_type">
|
||||
<span class="add-on"><%= t("curation.section_type") %></span>
|
||||
<%= f.select :section_type, CurationPost::SECTION_TYPES.map { |type| [t("curation.#{type}"), type] },
|
||||
{ include_blank: t("curation.please_select") },
|
||||
{ include_blank: t("curation.please_select"), selected: form_section_post.section_type },
|
||||
class: 'form-control' %>
|
||||
</span>
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
|||
<% if defined? UniversalTable %>
|
||||
<span class="tab-content section_type_ut" style="display:none">
|
||||
<span class="add-on"><%= t("curation.tables") %></span>
|
||||
<%= f.select :section_type, UTable.all.map { |table| [table.title, table.uid] },
|
||||
<%= f.select :universal_table, UTable.all.map { |table| [table.title, table.uid] },
|
||||
{ include_blank: t("curation.please_select") },
|
||||
class: 'form-control' %>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue