<%= 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_text, "Tutorial Description" %> <%= form.text_area :tutorial_post_text, class: "form-control editor" %>
<%= form.label :tutorial_post_status, "Tutorial Status" %> <%= form.select( :tutorial_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "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, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %> <%= post_category.check_box %> <%= post_category.label %>
<% end %>
<%= collection_select(:tutorial_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {}, {class: "form-control"}) %>
<%= form.submit class: "btn btn-primary" %>
<% end %>