The personal finance app for everyone
Allow institutions on edit account form
Zach Gollwitzeraa16807c6c35
diff --git a/app/views/accounts/_form.html.erb b/app/views/accounts/_form.html.erbindex d682e0b9..8a81c49e 100644--- a/app/views/accounts/_form.html.erb+++ b/app/views/accounts/_form.html.erb@@ -4,7 +4,13 @@<div class="grow space-y-2"><%= f.hidden_field :accountable_type %><%= f.text_field :name, placeholder: t(".name_placeholder"), required: "required", label: t(".name_label"), autofocus: true %>- <%= f.hidden_field :institution_id %>++ <% if account.new_record? %>+ <%= f.hidden_field :institution_id %>+ <% else %>+ <%= f.collection_select :institution_id, Current.family.institutions.alphabetically, :id, :name, { include_blank: t(".ungrouped"), label: t(".institution") } %>+ <% end %>+<%= f.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %><% if account.new_record? %>diff --git a/config/locales/views/accounts/en.yml b/config/locales/views/accounts/en.ymlindex 64a42f3c..b0b64212 100644--- a/config/locales/views/accounts/en.yml+++ b/config/locales/views/accounts/en.yml@@ -86,6 +86,8 @@ en:new_account: New accountno_accounts: No accounts yetform:+ institution: Financial institution+ ungrouped: "(none)"balance: Current balancename_label: Account namename_placeholder: Example account name