forgeplus/app/views/action/templates/_form.html.erb

44 lines
1.3 KiB
Plaintext

<%= form_with(model: template, local: true) do |form| %>
<% if template.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(template.errors.count, "error") %> prohibited this node type from being saved:</h2>
<ul>
<% template.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 :description, "描述" %>
<%= form.text_area :description, rows: 5, :style => 'width:800px;' %>
</div>
<div class="field">
<%= form.label :img, "配图" %>
<%= form.text_field :img %>
</div>
<div class="field">
<%= form.label :sort_no, "排序号" %>
<%= form.text_field :sort_no %>
</div>
<div class="field">
<%= form.label :yaml, "yaml语法代码" %>
<%= form.text_area :yaml, rows: 5, :style => 'width:1200px;' %>
</div>
<div class="field">
<%= form.label :json, "json语法代码" %>
<%= form.text_area :json, rows: 5, :style => 'width:1200px;' %>
</div>
<div class="actions" style="margin-top:10px;">
<!-- <a href="/managements/competition/customize" style="font-size: 28px;">>>前往节点管理页面</a>-->
<%= form.submit("保存") %>
</div>
<% end %>