<%= form_with(model: project_post, local: true) do |form| %> <%= render "phcdevworks_notifications/bootstrap/validations", :object => @project_post %>
<%= form.label :project_post_title, "Project Title" %> <%= form.text_field :project_post_title, placeholder: "Project Title", class: "form-control" %>
<%= form.label :project_post_description, "Project Description" %> <%= form.text_area :project_post_description, placeholder: "Project Description", class: "form-control editor" %>
<%= form.label :project_post_url, "Project URL" %> <%= form.text_field :project_post_url, placeholder: "Project URL", class: "form-control" %>
<%= form.label :project_post_status, "Project Status" %> <%= form.select( :project_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
<%= form.label :project_post_image, "Project Image" %> <%= form.file_field :project_post_image, class: "form-control" %>
<% if form.object.project_post_image.attached? %> <%= image_tag main_app.url_for(form.object.project_post_image), class: "img-responsive img-thumbnail" %> <% end %>
<%= form.collection_check_boxes :type_ids, PhcdevworksPortfolio::Project::Type.all, :id, :project_type_name do |project_type| %> <%= project_type.check_box class: "form-check-input" %> <%= project_type.label class: "form-check-label" %> <% end %>
<%= form.collection_check_boxes :category_ids, PhcdevworksCoreModules::Post::Category.all, :id, :post_category_name do |post_category| %> <%= post_category.check_box class: "form-check-input" %> <%= post_category.label class: "form-check-label" %> <% end %>
<%= collection_select(:project_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 %>