add transaction default debtor and creditor
This commit is contained in:
parent
21e6432b41
commit
1ac1d54c26
1 changed files with 4 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
||||||
= @transaction.errors.full_messages.join(", ")
|
= @transaction.errors.full_messages.join(", ")
|
||||||
= simple_form_for @transaction do |f|
|
= simple_form_for @transaction do |f|
|
||||||
- if current_user.penning
|
- if current_user.penning
|
||||||
= f.collection_select :debtor, User.all, :name, :name, {}, { class: 'select2-selector' }
|
= f.collection_select :debtor, User.all, :name, :name,
|
||||||
|
{selected: current_user.name}, { class: 'select2-selector'}
|
||||||
- else
|
- else
|
||||||
= f.hidden_field :debtor, value: current_user.name
|
= f.hidden_field :debtor, value: current_user.name
|
||||||
= f.collection_select :creditor, User.all, :name, :name, {}, { class: 'select2-selector' }
|
= f.collection_select :creditor, User.all, :name, :name,
|
||||||
|
{selected: User.zeus.name}, { class: 'select2-selector' }
|
||||||
= f.input :amount
|
= f.input :amount
|
||||||
= f.input :message, required: true
|
= f.input :message, required: true
|
||||||
= f.submit "Send it!"
|
= f.submit "Send it!"
|
||||||
|
|
Loading…
Reference in a new issue