diff --git a/app/views/accounts/_form.html.erb b/app/views/accounts/_form.html.erb index d682e0b9..8a81c49e 100644 --- a/app/views/accounts/_form.html.erb +++ b/app/views/accounts/_form.html.erb @@ -4,7 +4,13 @@
<%= 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.yml index 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 account no_accounts: No accounts yet form: + institution: Financial institution + ungrouped: "(none)" balance: Current balance name_label: Account name name_placeholder: Example account name