-# 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') .bootstrap_header_padding .container .row-fluid .span12 #section_header %h2 = t('settings') = render 'shared/settings_nav' .row-fluid .span3 .span6 .row-fluid .span6 %h3 = t('.your_handle') %p %b= current_user.diaspora_handle .span6 %h3 = t('.your_email') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| = f.error_messages .form-inline = f.text_field :email, :value => @user.unconfirmed_email || @user.email, :class => "span7" = f.submit t('.change_email'), :class => "btn" .small-horizontal-spacer - if @user.unconfirmed_email.present? %p= t('.email_awaiting_confirmation', :email => @user.email, :unconfirmed_email => @user.unconfirmed_email) .small-horizontal-spacer %hr .row-fluid .span12 %h3 = t('.change_password') = form_for @user, :url => user_path, :html => { :method => :put } do |f| - if (@user.errors.keys & [:password, :password_confirmation, :current_password]).present? = f.error_messages %p = f.label :current_password, t('.current_password') = f.password_field :current_password, :placeholder => t('.current_password_expl') %p = f.label :password, t('.new_password') = f.password_field :password, :placeholder => t('.character_minimum_expl') %p = f.label :password_confirmation, t('password_confirmation') = f.password_field :password_confirmation, :placeholder => t('.character_minimum_expl') .submit_block = link_to t('cancel'), edit_user_path = t('or') = f.submit t('.change_password'), class: "btn", name: 'change_password' %hr .row-fluid .span-12 %h3 = t('.change_language') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| .form-inline = f.select :language, available_language_options = f.submit t('.change_language'), :class => "btn" %hr .row-fluid .span-12 %h3#stream-preferences = t('.stream_preferences') = form_for current_user, :url => user_path, :html => { :method => :put } do |f| = f.fields_for :stream_preferences do |type| #stream_prefs - if AppConfig.settings.community_spotlight.enable? = f.label :show_community_spotlight_in_stream, :class => "checkbox" do = f.check_box :show_community_spotlight_in_stream = t('.show_community_spotlight') .small-horizontal-spacer = f.label :getting_started, :class => "checkbox" do = f.check_box :getting_started = t('.show_getting_started') .small-horizontal-spacer = f.submit t('.change'), :class => 'btn' %hr .row-fluid .span-12 %h3#auto-follow-back-preferences = t('.following') = form_for current_user, :url => user_path, :html => { :method => :put } do |f| = f.label :auto_follow_back, :class => "checkbox" do = f.check_box :auto_follow_back = t('.auto_follow_back') .small-horizontal-spacer %div{:class => "muted"} = t('.auto_follow_aspect') = f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects) .small-horizontal-spacer = f.submit t('.change'), :class => 'btn' %hr .row-fluid .span-12 %h3 = t('.receive_email_notifications') = form_for 'user', :url => user_path, :html => { :method => :put } do |f| = f.fields_for :email_preferences do |type| #email_prefs - if current_user.admin? = type.label :someone_reported, :class => "checkbox" do = type.check_box :someone_reported, {:checked => @email_prefs['someone_reported']}, false, true = t('.someone_reported') .small-horizontal-spacer = type.label :started_sharing, :class => "checkbox" do = type.check_box :started_sharing, {:checked => @email_prefs['started_sharing']}, false, true = t('.started_sharing') .small-horizontal-spacer = type.label :mentioned, :class => "checkbox" do = type.check_box :mentioned, {:checked => @email_prefs['mentioned']}, false, true = t('.mentioned') .small-horizontal-spacer = type.label :liked, :class => "checkbox" do = type.check_box :liked, {:checked => @email_prefs['liked']}, false, true = t('.liked') .small-horizontal-spacer = type.label :reshared, :class => "checkbox" do = type.check_box :reshared, {:checked => @email_prefs['reshared']}, false, true = t('.reshared') .small-horizontal-spacer = type.label :comment_on_post, :class => "checkbox" do = type.check_box :comment_on_post, {:checked => @email_prefs['comment_on_post']}, false, true = t('.comment_on_post') .small-horizontal-spacer = type.label :also_commented, :class => "checkbox" do = type.check_box :also_commented, {:checked => @email_prefs['also_commented']}, false, true = t('.also_commented') .small-horizontal-spacer = type.label :private_message, :class => "checkbox" do = type.check_box :private_message, {:checked => @email_prefs['private_message']}, false, true = t('.private_message') .small-horizontal-spacer = f.submit t('.change'), :class => "btn", :id => "change_email_preferences" %hr .row-fluid #account_data.span6 %h3 = t('.export_data') - if current_user.exporting .export-in-progress= t('.export_in_progress') - elsif current_user.export.present? = link_to t('.download_export'), download_profile_user_path, class: "btn btn-success" %h6 = t('.last_exported_at', timestamp: current_user.exported_at) = link_to t('.request_export_update'), export_profile_user_path, class: "btn" - else = link_to t('.request_export'), export_profile_user_path, :class => "btn" - if current_user.exporting_photos .small-horizontal-spacer .export-in-progress= t('.export_photos_in_progress') - elsif current_user.exported_photos_file.present? .small-horizontal-spacer = link_to t('.download_export_photos'), download_photos_user_path, class: "btn btn-success" %h6 = t('.last_exported_at', timestamp: current_user.exported_photos_at) = link_to t('.request_export_photos_update'), export_photos_user_path, class: "btn" - else .small-horizontal-spacer = link_to t('.request_export_photos'), export_photos_user_path, :class => "btn" .span6 %h3 = t('.close_account_text') =link_to t('.close_account_text'), '#close_account_pane', :rel => 'facebox', :class => "btn btn-danger", :id => "close_account" .hidden#close_account_pane{:rel => 'facebox'} #inner_account_delete %h1 = t('.close_account.dont_go') %p = t('.close_account.make_diaspora_better') .row-fluid .span6 = image_tag 'sadcat.jpg' .small-horizontal-spacer %small %b = t('.close_account.mr_wiggles') .span6 %ul %li = t('.close_account.what_we_delete') %li = t('.close_account.locked_out') %li = t('.close_account.lock_username') %p %b = t('.close_account.no_turning_back') = 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_text'), :class => "btn btn-danger", :id => "close_account_confirm", :data => { :confirm => t('are_you_sure_delete_account') } .span3