18 lines
1,006 B
Text
18 lines
1,006 B
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 form-inline" } do |f|
|
|
= f.hidden_field :debtor, value: @user.name
|
|
= f.select :creditor,
|
|
options_from_collection_for_select(User.all.order(:name), :name, :name),
|
|
{ include_blank: true },
|
|
{ class: 'select2-selector', required: true, data: { placeholder: "Creditor", width: 150 } }
|
|
= f.text_field :message, placeholder: "Message", size: 75, class: "form-control", required: true
|
|
.input-group
|
|
%span.input-group-addon
|
|
%span.glyphicon.glyphicon-euro
|
|
= f.number_field :euros, value: amount(@transaction.amount),
|
|
placeholder: "Bedrag", step: 0.01, min: (0.01 unless current_user.penning),
|
|
class: "form-control", size: 20, max: Rails.application.config.maximum_amount/100, required: true
|
|
= f.submit "Send it!", class: "pure-button pure-button-primary btn"
|