Allow specifying a new path for new files

This commit is contained in:
Sebastian Serth
2021-12-14 23:34:03 +01:00
parent e84276e1f5
commit c438ce4c64

View File

@ -4,7 +4,10 @@
= f.text_field(:name, class: 'form-control', required: true)
.form-group
= f.label(:path, t('activerecord.attributes.file.path'))
= f.select(:path, @paths, {}, class: 'form-control')
|  
a.toggle-input data={text_initial: t('shared.new'), text_toggled: t('shared.back')} href='#' = t('shared.new')
.original-input = f.select(:path, @paths, {}, class: 'form-control')
= f.text_field(:path, class: 'alternative-input form-control', disabled: true)
.form-group
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'))
= f.collection_select(:file_type_id, FileType.where(binary: false).order(:name), :id, :name, {selected: @exercise.execution_environment.file_type.try(:id)}, class: 'form-control')