54 lines
2.1 KiB
Text
54 lines
2.1 KiB
Text
<%#
|
|
# @file
|
|
# /users/:id/edit
|
|
# User edit form
|
|
#%>
|
|
|
|
<% content_for :title, @user.name + "'s Settings | Metamaps" %>
|
|
<div id="yield">
|
|
<%= form_for @user, url: user_url, :html =>{ :multipart => true, :class => "edit_user centerGreyForm"} do |form| %>
|
|
<h3>Edit Account</h3>
|
|
<div class="userImage">
|
|
<div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()">
|
|
<%= image_tag @user.image.url(:round), :size => "84x84" %>
|
|
<div class="editPhoto"></div>
|
|
</div>
|
|
<div class="userImageMenu">
|
|
<div class="userMenuArrow"></div>
|
|
<ul>
|
|
<li class="upload">
|
|
Upload Photo
|
|
<%= hidden_field_tag "remove_image", "0" %>
|
|
<%= form.file_field :image %>
|
|
<%= form.label :image %>
|
|
</li>
|
|
<li class="remove" onclick="Metamaps.Account.removePicture()">Remove</li>
|
|
<li class="cancel" onclick="Metamaps.Account.closeChangePicture()">Cancel</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="accountName" onclick="Metamaps.Account.changeName()">
|
|
<div class="nameEdit"><%= @user.name %></div>
|
|
</div>
|
|
<div class="changeName">
|
|
<%= form.label :name, "Name:", :class => "firstFieldText" %>
|
|
<%= form.text_field :name %>
|
|
</div>
|
|
<div><%= form.label :email, "Email:", :class => "firstFieldText" %>
|
|
<%= form.email_field :email %></div>
|
|
<div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div>
|
|
<div class="toHide">
|
|
<div>
|
|
<%= form.label :current_password, "Current Password:", :class => "firstFieldText" %>
|
|
<%= password_field_tag :current_password, params[:current_password] %>
|
|
</div>
|
|
<div><%= form.label :password, "New Password:", :class => "firstFieldText" %>
|
|
<%= form.password_field :password, :autocomplete => :off%></div>
|
|
<div><%= form.label :password_confirmation, "Confirm New Password:", :class => "firstFieldText" %>
|
|
<%= form.password_field :password_confirmation, :autocomplete => :off%></div>
|
|
<div class="noChangePass" onclick="Metamaps.Account.hidePass()">Oops, don't change password</div>
|
|
</div>
|
|
<%= form.submit "Update", class: "update" %>
|
|
<% end %>
|
|
</div>
|