<%= form_with(model: tutorial_post, local: true) do |form| %> <%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_post %>
<%= form.label :tutorial_post_title, "Tutorial Title" %> <%= form.text_field :tutorial_post_title, placeholder: "Tutorial Title", class: "form-control" %>
<%= form.label :tutorial_post_description, "Tutorial Description" %> <%= form.text_area :tutorial_post_description, class: "form-control", rows: "10" %>
<%= form.label :tutorial_post_status, "Tutorial Status" %> <%= form.select( :tutorial_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control form-control"}) %>
<%= form.label :tutorial_post_image, "Featured Image" %> <%= form.file_field :tutorial_post_image, class: "form-control" %>
<% if form.object.tutorial_post_image.attached? %> <%= image_tag main_app.url_for(form.object.tutorial_post_image), class: "img-responsive img-thumbnail" %> <% end %>
<%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:tutorial_category_name), :id, :tutorial_category_name do |post_category| %> <%= post_category.check_box %> <%= post_category.label %>
<% end %>
<%= form.submit class: "btn btn-primary" %>
<% end %>