%= form_with(url: url, model: donation, local: true) do |form| %> <% if donation.errors.any? %> <%= pluralize(donation.errors.count, "error") %> prohibited this donation from being saved: <% donation.errors.full_messages.each do |message| %> <%= message %> <% end %> <% end %> <%= form.label :user_id %> <%= form.collection_select :user_id, User.where(ou: Setting.primary_domain).order(:cn), :id, :cn, {} %> <%= form.label :amount_sats, "Amount BTC (sats)" %> <%= form.number_field :amount_sats %> <%= form.label :amount_eur, "Amount EUR (cents)" %> <%= form.number_field :amount_eur %> <%= form.label :amount_usd, "Amount USD (cents)"%> <%= form.number_field :amount_usd %> <%= form.label :public_name %> <%= form.text_field :public_name %> <%= form.label :paid_at %> <%= form.text_field :paid_at %> <%= link_to 'Cancel', @donation.id.present? ? admin_donation_path(@donation) : admin_donations_path, class: 'btn-md btn-gray' %> <%= form.submit class: 'ml-2 btn-md btn-blue' %> <% end %>
<%= link_to 'Cancel', @donation.id.present? ? admin_donation_path(@donation) : admin_donations_path, class: 'btn-md btn-gray' %> <%= form.submit class: 'ml-2 btn-md btn-blue' %>