23 lines
1.2 KiB
Text
23 lines
1.2 KiB
Text
#transaction_success.pure-alert.pure-alert-success.hidden
|
|
Transaction created!
|
|
= render 'partials/form_errors', object: @transaction
|
|
|
|
= form_for @transaction, remote: true, html: { class: "pure-form" } do |f|
|
|
- if current_user.penning
|
|
= f.collection_select :debtor, User.all, :name, :name,
|
|
{ selected: @transaction.debtor.try(:name) || current_user.name }, { class: 'select2-selector'}
|
|
- else
|
|
= f.hidden_field :debtor, value: current_user.name
|
|
= f.select :creditor,
|
|
options_from_collection_for_select(User.all.order(:name), :name, :name),
|
|
{ include_blank: true },
|
|
{ class: 'select2-selector', size: 50 }
|
|
-# { class: 'select2-selector', size: 50, required: true }
|
|
= f.text_field :message, placeholder: "Message", size: 75
|
|
-# = f.text_field :message, required: true, placeholder: "Message", size: 75
|
|
%fieldset.pure-group-inline
|
|
%span.icon-euro.pure-group-addon
|
|
= f.number_field :euros, value: amount(@transaction.amount),
|
|
placeholder: "Bedrag", step: 0.01, min: 0.01, class: "pure-group-addon price", size: 20
|
|
-# placeholder: "Bedrag", step: 0.01, min: 0.01, class: "pure-group-addon price", size: 20, required: true
|
|
= f.submit "Send it!", class: "pure-button pure-button-primary"
|