%div.ofu-field{data: {auto: options.fetch(:auto, true) ? "true" : "false", url: file_upload_path, text: I18n.t('ofu_file_uploader.complete') } } - options = options.dup - classes = (options.delete(:class) || "").split - classes << "ofu-input" - data = (options.delete(:data) || {}) - data["files-container"] = ".ofu-files-container" - options = options.merge(class: classes.join(" "), data: data) = form.file_field attachment, options = form.hidden_field "#{attachment}_uploaded_file_id" .ofu-files-container