Commit 67290576
Changed files (1)
app
views
registrations
app/views/registrations/edit.html.erb
@@ -12,7 +12,8 @@
<h5><%= current_user.name %></h5>
<p>member since: <%= current_user.created_at.to_s :foomat %></p>
<p>last signed in: <%= current_user.last_sign_in_at.to_s :foomat %></p>
- <p><a id="change-picture" data-content="We use gravatar to display your profile picture. This is a friendly third party service that allows you to manage your profile picture associated with your email address." rel="popover" class="btn btn-primary" href="http://gravatar.com/emails" data-original-title="Gravatar">Change My Picture</a></p>
+ <%#<p><a id="change-picture" data-content="We use gravatar to display your profile picture. This is a friendly third party service that allows you to manage your profile picture associated with your email address." rel="popover" class="btn btn-primary" href="http://gravatar.com/emails" data-original-title="Gravatar">Change My Picture</a></p>%>
+ <p><a id="change-avatar" data-content="" class="btn btn-primary" data-toggle="modal" href="#change-password-dialog">Change My Picture</a></p>
</div>
</div>
<div style="padding: 8px 0;" class="well">
@@ -92,11 +93,23 @@
<%= f.password_field :password_confirmation %>
<%= f.submit "Change My Password", :class=>"btn btn-primary" %>
<% end %>
- <%= form_tag(avatars_path(current_user), :method => "post", :multipart => true) do |f| %>
+ </div>
+ </div>
+ <div id="change-password-dialog" class="modal hide fade">
+ <%= form_tag(avatars_path(current_user), :method => "post", :multipart => true) do |f| %>
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">x</button>
+ <h3>Change My Picture</h3>
+ </div>
+ <div class="modal-body">
+ <%= avatar_for(current_user) %>
<%= fields_for Avatar.new do |f| %>
<%= f.file_field :avatar, :rel => avatars_path(current_user) %>
- <input type="submit" class="btn primary" value="Change My Picture" />
<% end %>
- <% end %>
- </div>
+ </div>
+ <div class="modal-footer">
+ <a href="#" class="btn" data-dismiss="modal">Close</a>
+ <input type="submit" class="btn btn-primary" value="Save changes" />
+ </div>
+ <% end %>
</div>