Merge branch 'api'
This commit is contained in:
commit
e4bdeea61a
1 changed files with 5 additions and 3 deletions
|
@ -1,11 +1,13 @@
|
||||||
= render 'partials/form_errors', object: @transaction
|
= render 'partials/form_errors', object: @transaction
|
||||||
= 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,
|
||||||
= f.input :cents, input_html: { value: @transaction.amount }
|
{selected: User.zeus.name}, { class: 'select2-selector' }
|
||||||
= f.input :message, required: true
|
= f.input :message, required: true
|
||||||
|
= f.input :euros, input_html: { value: @transaction.amount/100}
|
||||||
.pure-controls
|
.pure-controls
|
||||||
= f.button :submit, "Send it!"
|
= f.button :submit, "Send it!"
|
||||||
|
|
Loading…
Reference in a new issue