foodsoft/plugins/documents/app/views/documents/_form.html.haml
2017-11-21 10:12:13 +01:00

12 lines
474 B
Text

= simple_form_for @document, validate: true do |f|
= f.hidden_field :parent_id
.modal-header
= close_button :modal
%h3= @document.folder? ? t('.new_folder') : t('.new')
.modal-body
= f.input :name, as: :string, required: @document.folder?
- if @document.file?
= f.input :data, as: :file, required: true
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= f.submit t('.submit'), class: 'btn btn-primary'