Sha256: 2475d6a77c5369ad0f326b064abdfbfcf9cac4704902ecafbbf509b4d1b0e6f2

Contents?: true

Size: 1.94 KB

Versions: 13

Compression:

Stored size: 1.94 KB

Contents

<!-- Form - Tutorial - Posts -->
<%= form_with(model: tutorial_post, local: true) do |form| %>

    <!-- PHCNotifi Render Validation -->
    <%= render "phcdevworks_notifications/bootstrap/validations", :object => @tutorial_post %>
    <!-- PHCNotifi Render Validation -->

    <!-- Form Input Fields -->
    <div class="form-group field_with_errors">
        <%= form.label :post_title, "Tutorial Title" %>
        <%= form.text_field :post_title, placeholder: "Tutorial Title", class: "form-control" %>
    </div>

    <div class="form-group field_with_errors">
        <%= form.label :post_description, "Tutorial Description" %>
        <%= form.text_area :post_description, class: "form-control", rows: "10" %>
    </div>

    <div class="form-group field_with_errors">
        <%= form.label :post_status, "Tutorial Status" %>
        <%= form.select( :post_status, [["Draft","draft"],["Published","published"],["Review","review"]], {}, {class: "form-control"}) %>
    </div>

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

    <div class="form-group field_with_errors">
        <label>Select a Category</label>
        <div class="panel-body">
            <%= form.collection_check_boxes :category_ids, PhcdevworksTutorials::Tutorial::Category.order(:category_name), :id, :category_name do |post_category| %>
                <%= post_category.check_box %>
                <%= post_category.label %><br>
            <% end %>
        </div>
    </div>
    <!-- Form Input Fields -->

    <!-- Form Submition Button -->
    <div class="actions">
        <%= form.submit class: "btn btn-primary" %>
    </div>
    <!-- For Submition Button -->

<% end %>
<!-- Form - Tutorial - Posts -->

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
phcdevworks_tutorials-6.1.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-6.0.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.2.2 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.2.1 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.2.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.1.2 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.1.1 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.1.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.0.2 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.0.1 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-5.0.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-4.0.1 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb
phcdevworks_tutorials-4.0.0 app/views/phcdevworks_tutorials/tutorial/posts/_form.html.erb