This commit is contained in:
BoHung Chiu 2021-07-02 17:33:58 +08:00
parent a64898356e
commit e08724e0ff
1 changed files with 35 additions and 33 deletions

View File

@ -1,13 +1,14 @@
<% active_module = @custom_data_field[:bind_module_app] rescue nil %>
<% active_uid = @custom_data_field[:bind_uid] rescue nil %>
<% active_module = @custom_configs.first.module if active_module.nil? %>
<div class="control-group input-content">
<% active_module = @custom_configs.first.module rescue nil if active_module.nil? %>
<% if @custom_configs.length != 0%>
<div class="control-group input-content">
<label class="control-label muted" for="custom_bind_module_app"><%=t("custom_gallery.use_module")%> :</label>
<div class="controls">
<%= select_tag("#{@field_name}[custom_data_field][bind_module_app]", options_for_select(@custom_configs.map{|c| [t("module_name.#{c.module}"),c.module]},active_module),{:id=>"custom_bind_module_app"})%>
</div>
</div>
<div class="control-group input-content">
</div>
<div class="control-group input-content">
<label class="control-label muted" for="custom_bind_uid"><%=t("custom_gallery.use_content")%> :</label>
<div class="controls">
<% @custom_configs.each do |c| %>
@ -22,8 +23,8 @@
<% end %>
<% end %>
</div>
</div>
<script type="text/javascript">
</div>
<script type="text/javascript">
if($(".bind_modules.hide").length != 0){
$(".bind_modules.hide").eq(-1).after($(".bind_modules.show"));
}
@ -36,4 +37,5 @@
$(".bind_modules.hide").eq(-1).after($(".bind_modules.show"));
}
})
</script>
</script>
<% end %>