<div class="modal fade activity-forum-change-modal" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title"><%= type == "create" ? "新增-#{Topic.type_filter_cn_name(@type)}" : "编辑-#{Topic.type_filter_cn_name(@type)}" %></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <%= form_for @topic, url: { controller: "topics", action: "#{type}" }, html: { enctype: 'multipart/form-data' } do |p| %>
        <div class="modal-body">
          <div class="form-group">
            <label for="type">配置类型：</label>
            <% user_type_options = Topic.group_types_options(params[:topic_type]) %>
            <%= select_tag('topic[type]', options_for_select(user_type_options, @topic.type), class: 'form-control') %>
          </div>
          <div class="form-group">
            <label>
              标题 <span class="ml10 color-orange mr20">*</span>
            </label>
            <input type="hidden" name="topic_type" , value="<%= params[:topic_type] %>"/>
            <%= p.text_field :title, class: "form-control input-lg", required: true %>
          </div>
          <div class="form-group">
            <label>
              帖子ID <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :uuid, class: "form-control input-lg", required: true %>
          </div>
          <div class="form-group">
            <label>
              描述 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_area :description, class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group">
            <label>
              排序等级
            </label>
            <%= p.number_field :order_index, class: "form-control", placeholder: "" %>
          </div>

        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
          <%= p.submit "确认", class: "btn btn-primary submit-btn" %>
        </div>
      <% end %>
    </div>
  </div>
</div>