file-manager/app/views/file_managers/custom_widget_data.html.erb

9 lines
542 B
Plaintext

<% active_setting_id = @custom_data_field[:setting_id] || @settings.first.id rescue nil %>
<% if @settings.length != 0 %>
<div class="control-group input-content">
<label class="control-label" for="custom_setting_id"><%=t("file_manager.path_setting")%> :</label>
<div class="controls">
<%= select_tag("#{@field_name}[custom_data_field][setting_id]", options_for_select(@settings.map.with_index{|setting, i| [t("file_manager.setting",:num=>i+1),setting.id]},active_setting_id),{:id=>"custom_setting_id"})%>
</div>
</div>
<% end %>