Commit bc705979 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix failing spec

parent 9ed1cbf2
class GitLabCrop class GitLabCrop
constructor: (el, opts = {}) -> constructor: (input, opts = {}) ->
# Input file @fileInput = $(input)
@fileInput = $(el)
# We should rename to avoid spec to fail
# Form will submit the proper input filed with a file using FormData
@fileInput
.attr('name', "#{@fileInput.attr('name')}-trigger")
.attr('id', "#{@fileInput.attr('id')}-trigger")
# Set defaults # Set defaults
{ {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
%a.btn.js-choose-user-avatar-button %a.btn.js-choose-user-avatar-button
Browse file... Browse file...
%span.avatar-file-name.prepend-left-default.js-avatar-filename No file chosen %span.avatar-file-name.prepend-left-default.js-avatar-filename No file chosen
= f.file_field :avatar_dialog_trigger, class: "js-user-avatar-input hidden", accept: "image/*" = f.file_field :avatar, class: "js-user-avatar-input hidden", accept: "image/*"
.help-block .help-block
The maximum file size allowed is 200KB. The maximum file size allowed is 200KB.
- if @user.avatar? - if @user.avatar?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment