2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
2013-01-26 01:49:40 +00:00
|
|
|
# /users/:id/edit
|
2013-01-11 23:49:59 +00:00
|
|
|
# User edit form
|
|
|
|
#%>
|
2013-07-09 16:32:13 +00:00
|
|
|
|
2014-08-12 15:09:53 +00:00
|
|
|
<% content_for :title, @user.name + "'s Settings | Metamaps" %>
|
2015-01-22 23:29:17 +00:00
|
|
|
|
|
|
|
<%= javascript_include_tag "pages/Metamaps.Admin" %>
|
2014-08-12 15:09:53 +00:00
|
|
|
<div id="yield">
|
2014-10-22 00:31:59 +00:00
|
|
|
<%= form_for @user, url: user_url, :html =>{ :multipart => true, :class => "edit_user centerGreyForm"} do |form| %>
|
2012-10-26 10:04:52 +00:00
|
|
|
<h3>Edit Account</h3>
|
2014-09-25 17:41:37 +00:00
|
|
|
<div class="userImage">
|
2014-10-22 00:31:59 +00:00
|
|
|
<div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()">
|
2014-11-25 20:06:30 +00:00
|
|
|
<%= image_tag @user.image.url(:ninetysix), :size => "84x84" %>
|
2014-10-22 00:31:59 +00:00
|
|
|
<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>
|
|
|
|
|
2014-09-25 17:41:37 +00:00
|
|
|
</div>
|
2014-09-27 02:31:06 +00:00
|
|
|
<div class="accountName" onclick="Metamaps.Account.changeName()">
|
|
|
|
<div class="nameEdit"><%= @user.name %></div>
|
|
|
|
</div>
|
2014-09-29 14:45:08 +00:00
|
|
|
<div class="changeName">
|
|
|
|
<%= form.label :name, "Name:", :class => "firstFieldText" %>
|
|
|
|
<%= form.text_field :name %>
|
|
|
|
</div>
|
2014-09-25 16:25:46 +00:00
|
|
|
<div><%= form.label :email, "Email:", :class => "firstFieldText" %>
|
2014-09-25 17:26:09 +00:00
|
|
|
<%= form.email_field :email %></div>
|
2014-09-26 12:42:11 +00:00
|
|
|
<div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div>
|
|
|
|
<div class="toHide">
|
2014-09-27 02:31:06 +00:00
|
|
|
<div>
|
|
|
|
<%= form.label :current_password, "Current Password:", :class => "firstFieldText" %>
|
|
|
|
<%= password_field_tag :current_password, params[:current_password] %>
|
|
|
|
</div>
|
2014-09-25 16:25:46 +00:00
|
|
|
<div><%= form.label :password, "New Password:", :class => "firstFieldText" %>
|
2014-09-25 17:26:09 +00:00
|
|
|
<%= 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>
|
2014-09-27 02:31:06 +00:00
|
|
|
<div class="noChangePass" onclick="Metamaps.Account.hidePass()">Oops, don't change password</div>
|
2014-09-26 12:42:11 +00:00
|
|
|
</div>
|
2014-11-04 02:59:15 +00:00
|
|
|
<div id="accountPageLoading"></div>
|
|
|
|
<%= form.submit "Update", class: "update", onclick: "Metamaps.Account.showLoading()" %>
|
2013-01-11 23:49:59 +00:00
|
|
|
<% end %>
|
2014-08-12 15:09:53 +00:00
|
|
|
</div>
|