ace with files

This commit is contained in:
yqbk
2016-08-02 15:02:02 +02:00
parent f7eaa24a1d
commit de866d00ca
6 changed files with 38 additions and 6 deletions

View File

@@ -1,8 +1,10 @@
.form-group class="form-group-#{attribute.to_s.gsub('_', '-')}"
= form.label(attribute, label)
|  
a.toggle-input data={text_initial: t('shared.upload_file'), text_toggled: t('shared.back')} href='#' = t('shared.upload_file')
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16)
// Need to render content in ace editor instead of plain text
= render('editor_frame', exercise: e, file: @files)
/= render('editor_frame', exercise: e, file: @files)
= form.file_field(attribute, class: 'alternative-input form-control', disabled: true)