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

11 lines
444 B
Text
Raw Normal View History

2015-09-08 21:07:00 +02:00
= @transaction.errors.full_messages.join(", ")
2015-09-09 11:24:45 +02:00
= simple_form_for @transaction do |f|
2015-09-09 15:31:23 +02:00
- if current_user.penning
= f.collection_select :debtor, User.all, :name, :name, {}, { class: 'select2-selector' }
- else
= f.hidden_field :debtor, value: current_user.name
2015-09-09 12:58:44 +02:00
= f.collection_select :creditor, User.all, :name, :name, {}, { class: 'select2-selector' }
2015-09-09 11:24:45 +02:00
= f.input :amount
= f.input :message, required: true
2015-09-08 16:19:48 +02:00
= f.submit "Send it!"