<%= bootstrap_form_for(@blog_post, html: {style: 'margin-bottom: 0px;', class: 'form-bordered'}) do |f| %> <%= f.alert_message "Please fix the errors below."%>
<%= f.form_group :title, class: "span5", style: 'margin-left: 0px;' do %> <%= f.text_field :title, label: (t 'blog.title'), class: 'input-block-level', required: true %> <% end %> <%= f.form_group :slug, class: "span4" do %> <%= f.text_field :slug, label: (t 'blog.slug'), class: 'input-block-level', required: true %> <% end %>
<%= image_tag @blog_post.image.to_s if @blog_post.image? %>
<%= f.file_field :image, class: 'hidden', label: (t 'blog.select_image') %>
<%= f.form_group :description, class: "span9", style: 'margin-left: 0px; margin-top: -130px;' do %> <%= f.text_field :description, label: (t 'blog.description'), class: 'input-block-level', required: true %> <% end %> <%= f.form_group :published, class: "span9 bootstrap_switch_group", style: 'margin-left: 0px; margin-top: -50px;' do %> <%= f.check_box :published, class: 'bootstrap_switch', label: (t 'blog.visibility'),data: { on_text: (t 'blog.publish'), off_text: (t 'blog.unpublish') } %> <% end %> <%= f.text_area :content, label: (t 'blog.content'), class: 'summernote', id: 'post_content', hide_label: :true %>
<%= f.submit (t 'blog.submit'), class: 'btn btn-success' %> <%= link_to 'Show', @blog_post, class: 'btn' if action_name == 'edit' %> <%= link_to (t 'blog.back'), admin_posts_path, class: 'btn btn-link' %>
<% end %>