<%= form_with(model: node_input, url: action_node_node_inputs_path(@node), local: true) do |form| %>
  <% if node_input.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(node_input.errors.count, "error") %> prohibited this node_input from being saved:</h2>

      <ul>
        <% node_input.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= form.label :name, "参数名称" %>
    <%= form.text_field :name %>
  </div>
  <div class="field">
    <%= form.label :input_type, "参数类型" %>
    <%= form.text_field :input_type %>
  </div>
  <div class="field">
    <%= form.label :description, "描述" %>
    <%= form.text_area :description, rows: 5, :style => 'width:800px;' %>
  </div>
  <div class="field">
    <%= form.label :default_value, "默认值" %>
    <%= form.text_field :default_value %>
  </div>
  <div class="field">
    <%= form.label :is_required, "是否必填项" %>
    <%= form.check_box("is_required", {}, "true", "false") %>
  </div>
  <div class="field">
    <%= form.label :sort_no, "排序号" %>
    <%= form.text_field :sort_no %>
  </div>

  <div class="actions" style="margin-top:10px;">
    <!--    <a href="/managements/competition/customize" style="font-size: 28px;">>>前往节点管理页面</a>-->
    <%= form.submit("保存") %>
  </div>
<% end %>
