Files
suggest/app/views/suggestions/_form.html.erb
2024-02-03 09:04:38 -05:00

33 lines
789 B
Plaintext

<%= 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 "Send Suggestion", class: "btn btn-primary" %>
</div>
<% end %>