first commit
This commit is contained in:
32
app/views/suggestions/_form.html.erb
Normal file
32
app/views/suggestions/_form.html.erb
Normal file
@@ -0,0 +1,32 @@
|
||||
<%= form_with(model: suggestion) do |form| %>
|
||||
<% if suggestion.errors.any? %>
|
||||
<div style="color: red">
|
||||
<h2><%= pluralize(suggestion.errors.count, "error") %> prohibited this suggestion from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% suggestion.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<%= form.label :subject, style: "display: block" %>
|
||||
<%= form.text_field :subject %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :body, style: "display: block" %>
|
||||
<%= form.text_area :body %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :sent, style: "display: block" %>
|
||||
<%= form.check_box :sent %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user