<%= 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 editor" %>
<%= form.label :post_url, "Project URL" %> <%= form.text_field :post_url, placeholder: "Project URL", class: "form-control" %>
<%= form.label :post_status, "Project 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, PhcdevworksCoreModules::Post::Category.all, :id, :category_name do |post_category| %> <%= post_category.check_box %> <%= post_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 %>
<%= collection_select(:project_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("seo_title"), :id, :seo_title, {}, {class: "form-control"}) %>
<%= form.submit class: "btn btn-primary" %>
<% end %>