metamaps--metamaps/views/users/edit.html.erb

88 lines
3.3 KiB
Text
Raw Normal View History

2018-03-04 02:25:42 +00:00
{#
# @file
# /users/:id/edit
# User edit form
2018-03-04 02:25:42 +00:00
#}
2018-03-04 02:25:42 +00:00
{ content_for :title, @user.name + "'s Settings | Metamaps" }
{ content_for :mobile_title, "Account Settings" }
2014-08-12 15:09:53 +00:00
<div id="yield">
2018-03-04 02:25:42 +00:00
{ form_for @user, url: user_url, :html =>{ :multipart => true, :class => "edit_user centerGreyForm"} do |form| }
2017-03-08 18:50:39 +00:00
<h3>Edit Settings</h3>
2014-09-25 17:41:37 +00:00
<div class="userImage">
<div class="userImageDiv" onclick="Metamaps.Account.toggleChangePicture()">
2018-03-04 02:25:42 +00:00
{ image_tag @user.image.url(:ninetysix), :size => "84x84" }
<div class="editPhoto"></div>
</div>
<div class="userImageMenu">
<div class="userMenuArrow"></div>
<ul>
<li class="upload">
Upload Photo
2018-03-04 02:25:42 +00:00
{ 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()">
2018-03-04 02:25:42 +00:00
<div class="nameEdit">{ @user.name }</div>
2014-09-27 02:31:06 +00:00
</div>
<div class="changeName">
2018-03-04 02:25:42 +00:00
{ form.label :name, "Name:", class: 'firstFieldText' }
{ form.text_field :name }
</div>
<div>
2018-03-04 02:25:42 +00:00
{ form.label :email, "Email:", class: 'firstFieldText' }
{ form.email_field :email }
</div>
<div>
2018-03-04 02:25:42 +00:00
{ form.label :emails_allowed, class: 'firstFieldText' do }
{ form.check_box :emails_allowed, class: 'inline' }
Send Metamaps notifications to my email.
2018-03-04 02:25:42 +00:00
{ end }
{ fields_for :settings, @user.settings do |settings| }
{ settings.label :follow_topic_on_created, class: 'firstFieldText' do }
{ settings.check_box :follow_topic_on_created, class: 'inline' }
Auto-follow topics you create.
2018-03-04 02:25:42 +00:00
{ end }
{ settings.label :follow_topic_on_contributed, class: 'firstFieldText' do }
{ settings.check_box :follow_topic_on_contributed, class: 'inline' }
2017-09-18 20:59:52 +00:00
Auto-follow topics you edit.
2018-03-04 02:25:42 +00:00
{ end }
{ settings.label :follow_map_on_created, class: 'firstFieldText' do }
{ settings.check_box :follow_map_on_created, class: 'inline' }
Auto-follow maps you create.
2018-03-04 02:25:42 +00:00
{ end }
{ settings.label :follow_map_on_contributed, class: 'firstFieldText' do }
{ settings.check_box :follow_map_on_contributed, class: 'inline' }
Auto-follow maps you edit.
2018-03-04 02:25:42 +00:00
{ end }
{ end }
</div>
2014-09-26 12:42:11 +00:00
<div class="changePass" onclick="Metamaps.Account.showPass()">Change Password</div>
<div class="toHide">
<div>
2018-03-04 02:25:42 +00:00
{ form.label :current_password, "Current Password:", :class => "firstFieldText" }
{ password_field_tag :current_password, params[:current_password] }
</div>
<div>
2018-03-04 02:25:42 +00:00
{ form.label :password, "New Password:", :class => "firstFieldText" }
{ form.password_field :password, :autocomplete => :off}
</div>
<div>
2018-03-04 02:25:42 +00:00
{ 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>
2014-09-27 02:31:06 +00:00
</div>
<div id="accountPageLoading"></div>
2018-03-04 02:25:42 +00:00
{ form.submit "Update", class: "update", onclick: "Metamaps.Account.showLoading()" }
<div class="clearfloat"></div>
2018-03-04 02:25:42 +00:00
{ end }
2014-08-12 15:09:53 +00:00
</div>