Files
suggest/app/views/suggestions/_form.html.erb
2024-02-04 20:58:30 -05:00

35 lines
878 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 class="form-floating">
<%= form.text_field :subject, class: "form-control" %>
<%= form.label :subject %>
</div>
<br>
<div class="form-floating">
<%= form.text_area :body, class: "form-control", style: "height: 100px" %>
<%= form.label :body %>
</div>
<div>
<%# form.label :sent, style: "display: block" %>
<%# form.check_box :sent %>
</div>
<br>
<div>
<%= form.submit "Send Suggestion", class: "btn btn-primary btn-lg" %>
</div>
<% end %>