diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..ce896ea99 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 diff --git a/app/assets/stylesheets/base.css b/app/assets/stylesheets/base.css index ce84acae4..e4ababadf 100644 --- a/app/assets/stylesheets/base.css +++ b/app/assets/stylesheets/base.css @@ -1,6 +1,6 @@ html, body { background: #fbfbfb; - font: 400 10px/20px Arial, sans-serif; + font: 400 12px/20px Arial, sans-serif; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; } @@ -66,19 +66,19 @@ h1 { } h2 { - font-size: 4.2em; + font-size: 3.2em; } h3 { - font-size: 3.6em; + font-size: 3em; } h4 { - font-size: 3em + font-size: 2.8em; } h5 { - font-size: 2.4em + font-size: 2.4em; } h6 { diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index fa62516e7..c0777d7eb 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -19,6 +19,19 @@ def update end end + def destroy + if current_user.valid_password?(params[:user][:current_password]) + UserInfoScrubber.scrub_personal_info!(current_user) + Activation.disable_instances!([current_user]) + Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name) + set_flash_message! :notice, :destroyed + respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) } + else + flash[:delete_alert] = "Incorrect password" + render action: :edit + end + end + private def create_from_json diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 85f77aff0..490aef690 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,22 +1,26 @@ -
Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
++ If for whatever reason you no longer wish to maintain an account with us, + you can delete it here. Please note that any classifications you've made on + projects, and any comments you've posted on our Talk discussion fora will + remain. +
+ + <% if flash[:delete_alert] %> +<%= flash[:delete_alert] %>
+ <% end %> + + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :delete }) do |f| %> +