<div class="modal fade platform-communicate-change-modal" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable" 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 @communicate, url: {controller: "platform_communicates", action: "#{type}"} do |p| %>
        <div class="modal-body">
          <div class="form-group">
            <label>
              标题 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.hidden_field :location, class: "form-control input-lg", required: true %>
            <%= p.text_field :title,class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group">
            <label>
              内容 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_area :content,class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group">
            <label>
              标签（多个请用,隔开） <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :tag_field,class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group">
            <label>
              url <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :url_or_uuid,class: "form-control input-lg",required: true%>
          </div>
<!--          <div class="form-group">-->
<!--            <label>-->
<!--              帖子ID <span class="ml10 color-orange mr20">*</span>-->
<!--            </label>-->
            <%#= p.number_field :fake_id,class: "form-control input-lg",required: true%>
<!--          </div>-->
          <div class="form-group">
            <label>
              排序等级 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.number_field :order_index,class: "form-control input-lg",required: true%>
          </div>
          <%if @communicate&.tag_field.to_s.include?("活动") && @communicate.location =='applet' %>
          <div class="form-group">
            <label>
              报名字段（多个请用英文,隔开）<span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :enroll_field,class: "form-control input-lg", required: true%>
          </div>
          <%end %>
        </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>