<%= form_with(model: article_post, local: true) do |form| %>

Publish Panel

<%= form.label :article_post_status, "Post Status" %> <%= form.select( :article_post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
<%= form.submit class: "btn btn-primary" %>

Post Images

<%= form.label :article_post_image, "Featured Image" %> <%= form.file_field :article_post_image, class: "form-control" %>
<% if form.object.article_post_image.attached? %> <%= image_tag main_app.url_for(form.object.article_post_image), class: "img-responsive img-thumbnail" %> <% end %>

Article Categories

<%= 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 %>

Article Marketing

<%= collection_select(:article_post, :optimization_id, PhcdevworksCoreModules::Marketing::Optimization.order("marketing_optimization_page_title"), :id, :marketing_optimization_page_title, {include_blank: true}, {class: "form-control"}) %>
<%= collection_select(:article_post, :link_id, PhcdevworksCoreModules::Affiliate::Link.order("affiliate_link_name"), :id, :affiliate_link_name, {include_blank: true}, {class: "form-control"}) %>
<%= form.label :slug, "Article Slug" %> <%= form.text_field :slug, class: "form-control", disabled: (true if article_post.new_record?) %>
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @article_post %>

<%= yield(:phc_title_tagline) %>

<%= form.label :article_post_title, "Article Title" %> <%= form.text_field :article_post_title, class: "form-control" %>
<%= form.text_area :article_post_text, class: "form-control editor" %>
<% end %>