/
edit.html.haml
206 lines (172 loc) · 6.05 KB
/
edit.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= t('.edit_account')
#section_header
%h2
= t('settings')
= render 'shared/settings_nav'
.span-12.prepend-5.last
.span-5.append-1
%h3
= t('.your_handle')
%p
%b= current_user.diaspora_handle
.span-5.last
%h3
= t('.your_email')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p
= f.text_field :email, :value => @user.unconfirmed_email || @user.email
= f.submit t('.change_email'), :class => "button"
%br
- if @user.unconfirmed_email.present?
%p= t('.email_awaiting_confirmation', :email => @user.email, :unconfirmed_email => @user.unconfirmed_email)
%br
%br
%br
%hr
%br
%h3
= t('.change_password')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p
= f.label :current_password, t('.current_password')
= f.password_field :current_password
%p
= f.label :password, t('.new_password')
= f.password_field :password
%p
= f.label :password_confirmation, t('password_confirmation')
= f.password_field :password_confirmation
.submit_block
= link_to t('cancel'), edit_user_path
= t('or')
= f.submit t('.change_password'), :class => "button"
%br
%br
%hr
%br
%h3
= t('.change_language')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p
= f.select :language, available_language_options
= f.submit t('.change_language'), :class => "button"
%br
%br
%hr
%br
%h3#stream-preferences
= t('.stream_preferences')
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p.checkbox_select
= f.label :show_community_spotlight_in_stream, t('.show_community_spotlight')
= f.check_box :show_community_spotlight_in_stream
%br
= f.submit t('.change'), :class => 'button'
%br
%br
%hr
%br
%h3#getting-started-preferences
= t('.show_getting_started')
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
%p.checkbox_select
= f.label :getting_started, t('.show_getting_started')
= f.check_box :getting_started
%br
= f.submit t('.change'), :class => 'button'
%br
%br
%hr
%br
%h3
= t('.receive_email_notifications')
= form_for 'user', :url => user_path, :html => { :method => :put } do |f|
= f.error_messages
= f.fields_for :email_preferences do |type|
#email_prefs
%p.checkbox_select
= type.label :also_commented, t('.also_commented')
= type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true
%br
%p.checkbox_select
= type.label :mentioned, t('.mentioned')
= type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true
%br
%p.checkbox_select
= type.label :comment_on_post, t('.comment_on_post')
= type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true
%br
%p.checkbox_select
= type.label :private_message, t('.private_message')
= type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true
%br
%p.checkbox_select
= type.label :started_sharing, t('.started_sharing')
= type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true
%br
%p.checkbox_select
= type.label :liked, t('.liked')
= type.check_box :liked, {:checked => @email_prefs['liked']}, false, true
%br
%p.checkbox_select
= type.label :reshared, t('.reshared')
= type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true
%br
= f.submit t('.change'), :class => "button"
%br
%br
%hr
%br
#account_data.span-5.append-2
%h3
= t('.export_data')
= link_to t('.download_xml'), export_user_path, :class => "button"
%br
= link_to t('.download_photos'), "#", :class => "button", :id => "photo-export-button", :title => t('.photo_export_unavailable')
.span-5.last
%h3
= t('.close_account')
=link_to 'Close Account', '#close_account_pane', :rel => 'facebox', :class => "button"
.hidden#close_account_pane{:rel => 'facebox'}
#inner_account_delete
%h1
Hey, please don't go!
%p
We want you to help us make Diaspora better, so you should help us out instead of leaving.
if you do want to leave, we want you to know what happens next.
.span-10
= image_tag 'http://itstrulyrandom.com/wp-content/uploads/2008/03/sadcat.jpg'
%br
%small
%b
Mr Wiggles will be sad to see you go
.span-10.last
%ul
%li
We delete all of your posts, profile data, as soon as humanly possible.
Your comments will hang around, but be associated with your Diaspora Handle.
%li
You will get signed out and locked out of your account.
%li
This will lock your username if you decided to sign back up.
%li
Currently, there is no turning back
%p
%b
If you really want this, type in your password below and click 'Close Account'
= form_for 'user', :url => user_path, :html => { :method => :delete } do |f|
= f.error_messages
%p
= f.label :close_account_password, t('.current_password'), :for => :close_account_password
= f.password_field :current_password, :id => :close_account_password
%p
= f.submit t('.close_account'), :confirm => t('are_you_sure_delete_account')