%= form_with(model: expense, class: "contents") do |form| %>
<% if expense.errors.any? %>
<%= pluralize(expense.errors.count, "error") %> prohibited this expense from being saved:
<% expense.errors.each do |error| %>
- <%= error.full_message %>
<% end %>
<% end %>
<%= form.label :description %>
<%= form.text_field :description, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :payment %>
<%= form.text_field :payment, class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full" %>
<%= form.label :period %>
<%=
form.select :period,
options_for_select(expense_periods, expense.period),
{},
class: "block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-2 w-full"
%>
<%= form.label :autopaid %>
<%= form.check_box :autopaid, class: "block mt-2 h-5 w-5" %>
<%= form.label :estimated %>
<%= form.check_box :estimated, class: "block mt-2 h-5 w-5" %>
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
<% end %>