2019-10-02 15:52:37 +08:00
|
|
|
<div class="modal modal-user-avatar" tabindex="-1" role="dialog"
|
|
|
|
data-update-url="<%= registration_path(resource_name) %>"
|
|
|
|
>
|
2019-10-01 22:49:46 +08:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2019-10-02 15:52:37 +08:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>"><span aria-hidden="true">×</span></button>
|
2019-10-01 22:49:46 +08:00
|
|
|
<h4 class="modal-title">
|
2019-10-02 15:52:37 +08:00
|
|
|
<%= t('users.registrations.edit.avatar_modal.title') %>
|
2019-10-01 22:49:46 +08:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="upload-block">
|
|
|
|
<div class="current-avatar">
|
|
|
|
<%= image_tag avatar_path(current_user, :medium) %>
|
|
|
|
<%= file_field_tag :raw_avatar, style: "display:none" %>
|
|
|
|
<%= hidden_field_tag :new_avatar, "" %>
|
|
|
|
</div>
|
|
|
|
<div class="avatar-preview-container" style="display:none"></div>
|
2019-10-02 15:52:37 +08:00
|
|
|
<div class="btn btn-default upload-photo"><%= t('users.registrations.edit.avatar_modal.upload_button') %></div>
|
2019-10-01 22:49:46 +08:00
|
|
|
</div>
|
|
|
|
<div class="option-text">
|
2019-10-02 15:52:37 +08:00
|
|
|
<%= t('users.registrations.edit.avatar_modal.option_text_html') %>
|
2019-10-01 22:49:46 +08:00
|
|
|
</div>
|
|
|
|
<div class="avatar-collection perfect-scrollbar">
|
|
|
|
<% Dir["public/images/avatars/*.png"].each do |avatar| %>
|
|
|
|
<% avatar_name = avatar.split('/')[-1] %>
|
|
|
|
<div class="avatar" data-avatar="<%= avatar_name %>">
|
|
|
|
<%= image_tag "/images/avatars/#{avatar_name}" %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2019-10-02 19:22:07 +08:00
|
|
|
<button type="button" class="btn btn-primary save-button disabled"><%= t('general.save') %></button>
|
2019-10-01 22:49:46 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|