<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%#= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <%= stylesheet_link_tag "ruling_template/template" %> <%= stylesheet_link_tag "ruling_template/colorpicker" %> <% end %> <% content_for :page_specific_javascript do %> <%#= javascript_include_tag "lib/bootstrap-fileupload" %> <%#= javascript_include_tag "lib/bootstrap-datetimepicker" %> <%#= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "ruling_template/colorpicker" %> <% end %>
<%= select_category(f, @module_app) %>
<%= f.label :allow_domain, t("ruling_template.allow_domain"), :class => "control-label muted" %>
<%= f.text_field :allow_domain, placeholder: 'example.com', :value=>(f.object.allow_domain.class==Array ? f.object.allow_domain.join(",") : f.object.allow_domain) %>
<%= f.label :price, t("ruling_template.price"), :class => "control-label muted" %>
<%= f.number_field :price, :min => 0, :step => 1000 %>
<%= f.label :colors, t("ruling_template.colors"), :class => "control-label muted" %>
<% if !@template.new_record? && !@template.colors.empty? %> <% @template.colors.each do |color| %>
<% end %> <% end %>
<%= select_tags(f, @module_app) %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@template.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :description_translations do |f| %> <%= f.text_area locale, rows: 5, class: "input-block-level", value: (@template.description_translations[locale] rescue nil) %> <% end %>
<% end %>
<%= f.hidden_field :user_id, :value => current_user.id.to_s %> <%= f.submit t('ruling_template.upload_files'), class: 'btn btn-primary' %> <%= t("cancel") %>