Sha256: 672c2f50fa1b5956b9f86a726309bb35ffddf2bff9e0797b6e3f80b22877817c

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

<%= form_for topic,
             url: topic.submit_path,
             html: {
                 class: "thredded--form thredded--new-topic-form #{local_assigns[:css_class]}",
                 'data-thredded-topic-form' => true,
                 'data-autocomplete-url' => autocomplete_users_path,
                 'data-autocomplete-min-length' => Thredded.autocomplete_min_length,
                 'data-thredded-submit-hotkey' => true,
             } do |form| %>
  <ul class="thredded--form-list on-top">
    <li class="title">
      <%= form.label :title, t('thredded.topics.form.title_label') %>
      <%= form.text_field :title, placeholder: placeholder, required: true, autocomplete: 'off' %>
      <%= render 'thredded/shared/field_errors', messages: form.object.errors[:title] if form.object.errors.include?(:title) %>
    </li>

    <% if form.object.category_options.any? %>
      <li class="category">
        <%= form.select :category_ids,
                        form.object.category_options,
                        {},
                        { multiple: true, 'data-placeholder' => t('thredded.topics.form.categories_placeholder') } %>
      </li>
    <% end %>

    <%= render 'thredded/posts_common/form/content',
               form: form,
               content_label: t('thredded.topics.form.content_label'),
               preview_url: topic.preview_path %>
    <%= render 'thredded/topics/topic_form_admin_options', form: form %>

    <li><%= form.submit t('thredded.topics.form.create_btn'), class: 'thredded--form--submit' %></li>
  </ul>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thredded-0.15.4 app/views/thredded/topics/_form.html.erb