<div class="modal fade project-category-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 @project_category, url: {controller: "project_categories", action: "#{type}"}, html: { enctype: 'multipart/form-data' } do |p| %>
        <div class="modal-body">
          <div class="form-group">
            <label>
              分类名称 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :name,class: "form-control input-lg",placeholder: "分类名称",required: true, maxlength: 64%>
          </div>
          <div class="form-group">
            <label>
              精选等级
            </label>
            <%= p.number_field :pinned_index,class: "form-control input-lg",placeholder: "精选等级",required: true%>
          </div>
          <%if false%>
          <div class="logo-item">
            <% logo_img = @project_category.logo_url %>
            <div class="logo-item-left mr-3 <%= logo_img ? 'has-img' : '' %>">
              <img class="logo-item-img nav-logo-img" src="<%= logo_img %>" style="<%= logo_img.present? ? '' : 'display: none' %>"/>
              <%= file_field_tag(:logo, accept: 'image/png,image/jpg,image/jpeg',style: "display: none", value: params[:logo]) %>
              <label for="logo" class="logo-item-upload" data-toggle="tooltip" data-title="选择图片"></label>
            </div>
            <div class="logo-item-right">
              <div class="logo-item-title flex-1">logo</div>
              <div>格式：PNG、JPG</div>
              <div>尺寸：高度38px以内，宽等比例缩放</div>
            </div>
          </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>