Hide delete attachment button when none present

This commit is contained in:
wvengen 2016-05-06 15:56:26 +02:00
parent 3e5b320a6b
commit 961c50b7e5
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@
= f.input :deposit, as: :string
= f.input :deposit_credit, as: :string
= f.input :attachment, as: :file, hint: t('.attachment_hint')
= f.input :delete_attachment, as: :boolean
- if f.object.attachment_data.present?
= f.input :delete_attachment, as: :boolean
= f.input :note
.form-actions
= f.submit class: 'btn'