fields for instead form for (solved problem with sibmission button)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
= form_for(file) do |f|
|
||||
= fields_for(file) do |f|
|
||||
li.panel.panel-default
|
||||
.panel-heading role="tab" id="heading"
|
||||
a.file-heading data-toggle="collapse" data-parent="#files" href="#collapse#{file.id}"
|
||||
@ -36,8 +36,6 @@
|
||||
.form-group
|
||||
= f.label(:role, t('activerecord.attributes.file.weight'))
|
||||
= f.number_field(:weight, class: 'form-control', min: 1, step: 'any')
|
||||
|
||||
/render ace editor
|
||||
- unless file.new_record?
|
||||
= render partial: 'ace', locals: { exercise: @exercise, file: file }
|
||||
|
||||
|
@ -29,13 +29,11 @@
|
||||
= f.check_box(:allow_file_creation)
|
||||
= t('activerecord.attributes.exercise.allow_file_creation')
|
||||
h2 = t('activerecord.attributes.exercise.files')
|
||||
|
||||
ul#files.list-unstyled.panel-group
|
||||
- @exercise.files.each do |file|
|
||||
= render partial: 'file_form', locals: { file: file }
|
||||
|
||||
= render partial: 'file_form', locals: {file: file}
|
||||
a#add-file.btn.btn-default.btn-sm.pull-right href='#' = t('.add_file')
|
||||
|
||||
ul#dummies.hidden
|
||||
= render partial: 'file_form', locals: { file: CodeOcean::File.new }
|
||||
= render partial: 'file_form', locals: {file: CodeOcean::File.new}
|
||||
.actions = render('shared/submit_button', f: f, object: @exercise)
|
||||
|
||||
|
Reference in New Issue
Block a user