forked from openware/barong
/
_form.html.erb
30 lines (24 loc) · 857 Bytes
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%= form_with(model: [:admin, @account, @label], local: true) do |form| %>
<% if label.errors.any? %>
<div class="alert alert-danger">
<h2><%= pluralize(@label.errors.count, "error") %> prohibited this label from being saved:</h2>
<ul>
<% @label.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<%= form.label :key, class: 'control-label'%>
<%= form.text_field :key, class: 'form-control col-sm-10'%>
<br>
<%= form.label :value, class: 'control-label'%>
<%= form.text_field :value, class: 'form-control col-sm-10'%>
<br>
<%= form.label :scope, class: 'control-label'%>
<%= form.select :scope, Label::SCOPES , class: 'form-control col-sm-10'%>
<br>
<%= form.submit 'Submit', class: 'btn btn-primary' %>
<br>
<br>
<% end %>