<div class="modal fade site-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 @site, url: {controller: "sites", action: "#{type}"} 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",required: true%>
          </div>
          <div class="form-group">
            <label>
              路由 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :url, class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group">
            <label>
              标识 <span class="ml10 color-orange mr20">*</span>
            </label>
            <%= p.text_field :key, class: "form-control input-lg",required: true%>
          </div>
          <div class="form-group ">
            <label for="status">类型：</label>
            <%= p.select :site_type, options_for_select(Site.site_types.map { |key, value| [key.humanize, key] }, @site.site_type), {}, class: "form-control" %>
          </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>