<%= form_with(model: project_post, local: true) do |form| %> <%= render "phcdevworks_notifications/bootstrap/validations", :object => @project_post %>
<%= form.label :post_title, "Project Title" %> <%= form.text_field :post_title, placeholder: "Project Title", class: "form-control" %>
<%= form.label :post_description, "Project Description" %> <%= form.text_area :post_description, placeholder: "Project Description", class: "form-control" %>
<%= form.label :post_url, "Project URL" %> <%= form.text_field :post_url, placeholder: "Project URL", class: "form-control" %>
<%= form.label :post_status, "Tutorial Status" %> <%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
<%= form.label :post_image, "Project Image" %> <%= form.file_field :post_image, class: "form-control" %>
<% if form.object.post_image.attached? %> <%= image_tag main_app.url_for(form.object.post_image), class: "img-responsive img-thumbnail" %> <% end %>
<%= form.collection_check_boxes :category_ids, PhcdevworksPortfolio::Project::Category.all, :id, :category_name do |project_category| %> <%= project_category.check_box %> <%= project_category.label %>
<% end %>
<%= form.collection_check_boxes :type_ids, PhcdevworksPortfolio::Project::Type.all, :id, :type_name do |project_type| %> <%= project_type.check_box %> <%= project_type.label %>
<% end %>
<%= form.submit class: "btn btn-primary" %>
<% end %>