<div class="modal fade ck-js-forum-change-modal" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title"><%= type == "create" ? "新增" : "编辑" %></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
       <%= form_for @ck_js_forum, url: {controller: "topic/ck_js_forums", action: "#{type}"} do |p| %>
        <div class="modal-body">
          <%if type == 'create' %>

            <div class="form-group">
              <label>
                类型 <span class="ml10 color-orange mr20">*</span>
              </label>
              <% topic_type_options = [['创客', 'Topic::CkForum'], ['竞赛', 'Topic::JsForum']] %>
              <%= select_tag(:type, options_for_select(topic_type_options), class: 'form-control') %>
            </div>
          <% end %>
          <div class="form-group">
            <label>
              标题 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= 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 :identifier,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>
              标签 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :labels,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>