tab/app/views/transactions/_new.html.haml

20 lines
1,003 B
Plaintext
Raw Normal View History

2015-09-11 11:16:53 +00:00
#transaction_success.pure-alert.pure-alert-success.hidden
Transaction created!
2015-09-10 19:46:05 +00:00
= render 'partials/form_errors', object: @transaction
2015-09-11 11:16:53 +00:00
2015-09-11 12:52:26 +00:00
= form_for @transaction, remote: true, html: { class: "pure-form form-inline" } do |f|
= f.hidden_field :debtor, value: @user.name
2015-09-11 12:52:26 +00:00
= f.select :creditor,
options_from_collection_for_select(User.all.order(:name), :name, :name),
2015-09-11 12:52:26 +00:00
{ include_blank: true },
2016-02-01 18:21:21 +00:00
{ class: 'select2-selector', required: true, data: { placeholder: "Creditor", width: 150 } }
2015-09-11 13:50:07 +00:00
= f.text_field :message, placeholder: "Message", size: 75, class: "form-control", required: true
2015-09-11 12:52:26 +00:00
.input-group
%span.input-group-addon
%span.glyphicon.glyphicon-euro
2015-09-10 19:46:05 +00:00
= f.number_field :euros, value: amount(@transaction.amount),
2017-01-09 14:46:43 +00:00
placeholder: "Amount", step: 0.01,
2016-02-10 19:32:43 +00:00
class: "form-control", size: 20, required: true,
max: (Rails.application.config.maximum_amount/100 unless current_user.penning)
2015-09-11 15:08:46 +00:00
= f.submit "Send it!", class: "pure-button pure-button-primary btn"