app/assets/javascripts/activeadmin-selleo-cms/forms.storage.js in activeadmin-selleo-cms-0.0.52 vs app/assets/javascripts/activeadmin-selleo-cms/forms.storage.js in activeadmin-selleo-cms-0.0.54
- old
+ new
@@ -48,12 +48,10 @@
var form_elem = $('#'+this["dom_id"]);
if ( ($(form_elem).attr('type') == 'checkbox') || ($(form_elem).attr('type') == 'radio') ) {
if (this["value"] == "true") {
$(form_elem).attr('checked', true);
}
- } else if ($(form_elem).attr('type') == 'file') {
- // do nothing
} else {
$(form_elem).val(this["value"]);
}
}
})
@@ -65,6 +63,10 @@
} else if ( ($(this).attr('type') == 'checkbox') || ($(this).attr('type') == 'radio') ) {
submitAnswer(form_id, this, $(this).is(':checked'))
} else {
submitAnswer(form_id, this, $(this).val())
}});
+
+ $.each($('.file_upload'), function(){
+ $(this).find('.files').load('/form_answers/attachments?form_uuid='+localStorage[form_id]+'&form_question_id='+$(this).data('question-id'));
+ });
}
\ No newline at end of file