<%# locals: (savings_goal:) %> <% if savings_goal.errors.any? %> <%= render "shared/form_errors", model: savings_goal %> <% end %> <%= styled_form_with model: savings_goal, url: savings_goal_path(savings_goal), method: :patch, class: "space-y-3" do |f| %> <%= f.text_field :name, label: t("savings_goals.form_stepper.step1.fields.name"), required: true, autofocus: true %> <%= f.money_field :target_amount, label: t("savings_goals.form_stepper.step1.fields.target_amount"), required: true %> <%= f.date_field :target_date, label: t("savings_goals.form_stepper.step1.fields.target_date") %>
<%= t("savings_goals.form_stepper.step1.fields.color") %>
<% SavingsGoal::COLORS.each do |c| %> <% end %>
<%= f.text_area :notes, label: t("savings_goals.form_stepper.step1.fields.notes"), rows: 2 %>
<%= f.submit t("savings_goals.edit.save") %>
<% end %>