Skip to content
Snippets Groups Projects
Commit 7216ce97 authored by Alfredo Sumaran's avatar Alfredo Sumaran
Browse files

Add modal dialog

parent 707be371
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -197,3 +197,20 @@
width: 105px;
}
}
.modal-profile-crop {
.modal-dialog {
width: 380px;
}
.profile-crop-image-container {
width: 350px;
height: 350px;
margin: 0 auto;
}
.crop-controls {
padding: 10px 0 0 0;
text-align: center;
}
}
Loading
Loading
@@ -26,7 +26,7 @@
%a.btn.js-choose-user-avatar-button
Browse file...
%span.avatar-file-name.prepend-left-default.js-avatar-filename No file chosen
= f.file_field :avatar, class: "js-user-avatar-input hidden"
= f.file_field :avatar_dialog_trigger, class: "js-user-avatar-input hidden", accept: "image/*"
.help-block
The maximum file size allowed is 200KB.
- if @user.avatar?
Loading
Loading
@@ -94,3 +94,25 @@
.prepend-top-default.append-bottom-default
= f.submit 'Update profile settings', class: "btn btn-success"
= link_to "Cancel", user_path(current_user), class: "btn btn-cancel"
.modal.modal-profile-crop
.modal-dialog
.modal-content
.modal-header
%button.close{:type => "button", :'data-dismiss' => "modal"}
%span
×
%h4.modal-title
Position and size your new avatar
.modal-body
.profile-crop-image-container
%img.modal-profile-crop-image
.crop-controls
.btn-group
%button.btn.btn-primary{ data: { method: "zoom", option: "0.1" } }
%span.fa.fa-search-plus
%button.btn.btn-primary{ data: { method: "zoom", option: "-0.1" } }
%span.fa.fa-search-minus
.modal-footer
%button.btn.btn-primary.js-upload-user-avatar{:type => "button"}
Set new profile picture
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment