mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 12:34:12 +00:00
* Remove balance mode, sketch out refactor * Activity view checkpoint * Entry partials, checkpoint * Finish txn partial * Give entries context when editing for different turbo responses * Calculate change of balance for each entry * Account tabs consolidation * Translations, linting, brakeman updates * Account actions concern * Finalize forms, get account system tests passing * Get tests passing * Lint, rubocop, schema updates * Improve routing and stream responses * Fix broken routes * Add import option for adding accounts * Fix system test * Fix test specificity * Fix sparklines * Improve account redirects
22 lines
909 B
Plaintext
22 lines
909 B
Plaintext
<%# locals: (account:, url:) %>
|
|
|
|
<%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow" do |form| %>
|
|
<div class="grow space-y-2">
|
|
<%= form.hidden_field :accountable_type %>
|
|
<%= form.hidden_field :return_to, value: params[:return_to] %>
|
|
|
|
<% if account.new_record? %>
|
|
<%= form.hidden_field :institution_id %>
|
|
<% else %>
|
|
<%= form.collection_select :institution_id, Current.family.institutions.alphabetically, :id, :name, { include_blank: t(".ungrouped"), label: t(".institution") } %>
|
|
<% end %>
|
|
|
|
<%= form.text_field :name, placeholder: t(".name_placeholder"), required: "required", label: t(".name_label") %>
|
|
<%= form.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %>
|
|
|
|
<%= yield form %>
|
|
</div>
|
|
|
|
<%= form.submit %>
|
|
<% end %>
|