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 @@ -
-

Change your password

+
+
+

Change your password

- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "form" }) do |f| %> - <%= devise_error_messages! %> - <%= f.hidden_field :reset_password_token %> + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put}) do |f| %> + <%= devise_error_messages! %> + <%= f.hidden_field :reset_password_token %> -
- <%= f.label :password, "New password" %>
- <%= f.password_field :password, autofocus: true, autocomplete: "off" %> -
+
+ <%= f.label :password, "New password" %>
+ <%= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control' %> +
-
- <%= f.label :password_confirmation, "Confirm new password" %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %> -
+
+ <%= f.label :password_confirmation, "Confirm new password" %>
+ <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %> +
-
<%= f.submit "Change my password" %>
- <% end %> - - <%= render "devise/shared/links" %> -
\ No newline at end of file + <%= f.submit "Change my password", class: 'btn btn-primary' %> + <% end %> +
+ + +
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 8f9ab69f8..79118af99 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,16 +1,20 @@ -
-

Forgot your password?

+
+
+

Forgot your password?

- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: "form form--new-password" }) do |f| %> - <%= devise_error_messages! %> + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> + <%= devise_error_messages! %> - +
+ <%= f.label :email %>
+ <%= f.email_field :email, autofocus: true, required: true, class: 'form-control' %> +
-
<%= f.submit "Send me reset email" %>
- <% end %> + <%= f.submit "Send me reset email", class: 'btn btn-primary' %> + <% end %> +
- <%= render "devise/shared/links" %> +
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 0a4cda975..77cda2746 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,35 +1,83 @@ -

Edit <%= resource_name.to_s.humanize %>

+
+
+

Update your profile

-<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> - <%= devise_error_messages! %> + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> + <%= devise_error_messages! %> -
<%= f.label :login %>
- <%= f.text_field :login, autofocus: true %>
+
+ <%= f.label :login %>
+ <%= f.text_field :login, autofocus: true, class: 'form-control' %> +
-
<%= f.label :display_name %>
- <%= f.text_field :display_name %>
+
+ <%= f.label :display_name %>
+ <%= f.text_field :display_name, class: 'form-control' %> +
-
<%= f.label :email %>
- <%= f.email_field :email %>
+
+ <%= f.label :email %>
+ <%= f.email_field :email, class: 'form-control' %> - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
- <% end %> + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> +
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
+ <% end %> +
-
<%= f.label :password %> (leave blank if you don't want to change it)
- <%= f.password_field :password, autocomplete: "off" %>
+
+
+ <%= f.label :password %> (leave blank if you don't want to change it)
+ <%= f.password_field :password, autocomplete: "off", class: 'form-control' %> +
-
<%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
+
+ <%= f.label :password_confirmation %>
+ <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %> +
+
-
<%= f.label :current_password %> (we need your current password to confirm your changes)
- <%= f.password_field :current_password, autocomplete: "off" %>
+
+
+ <%= f.label :current_password %> (we need your current password to confirm your changes)
+ <%= f.password_field :current_password, autocomplete: "off", class: 'form-control' %> +
+
-
<%= f.submit "Update" %>
-<% end %> + <%= f.submit "Update", class: 'btn btn-primary' %> + <% end %> +
+
-

Cancel my account

+
-

Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>

+
+
+
+
+
Cancel my account
-<%= link_to "Back", :back %> +

+ 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| %> +
+ <%= f.label :current_password %> (we need your current password to confirm your changes)
+ <%= f.password_field :current_password, autocomplete: "off", class: 'form-control' %> +
+ + <%= f.submit "Cancel my account", class: 'btn btn-danger' %> + <% end %> + + <%= link_to "Back", :back %> +
+
+
+
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index cee82ca5c..71e3eccc3 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,57 +1,59 @@ -
-

Sign up

- - <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: "form form--new-user"}) do |f| %> - -
-
- <%= f.label :login, "Username (required)" %><%= resource.errors[:login].join(', ')%>
- <%= f.text_field :login, autofocus: true, required: true %> -
-
- -
-
- <%= f.label :credited_name, "Real Name (optional)" %><%= resource.errors[:display_name].join(', ')%>
- <%= f.text_field :display_name %> - We’ll use this to give you credit in scientific papers, posters, etc -
-
- -
- +
+
+

Create account

+ + <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> + +
"> + <%= f.label :login, "Username (required)" %><%= resource.errors[:login].join(', ')%>
+ <%= f.text_field :login, autofocus: true, required: true, class: 'form-control' %> +
+ +
"> + <%= f.label :credited_name, "Real Name (optional)" %><%= resource.errors[:display_name].join(', ')%>
+ <%= f.text_field :display_name, class: 'form-control' %> + We’ll use this to give you credit in scientific papers, posters, etc +
+ +
"> + <%= f.label :email, "Email (required)"%><%= resource.errors[:email].join(', ')%>
+ <%= f.email_field :email, required: true, class: 'form-control' %> +
+ +
+ <%= f.label :password, "Password (required)"%><%= resource.errors[:password].join(', ')%>
+ <%= f.password_field :password, autocomplete: "off", required: true, class: 'form-control' %> + + <%= f.label :password_confirmation, "Password confirmation (required)" %><%= resource.errors[:password_confirmation].join(', ')%>
+ <%= f.password_field :password_confirmation, autocomplete: "off", required: true, class: 'form-control' %> +
+ +
+ +
+ +
+ <%= f.label :global_email_communication do %> + <%= f.check_box :global_email_communication, checked: true %> + It’s okay to send me email every once in a while. + <% end %>
-
-
- <%= f.label :password, "Password (required)"%><%= resource.errors[:password].join(', ')%>
- <%= f.password_field :password, autocomplete: "off", required: true %> -
- -
- <%= f.label :password_confirmation, "Password confirmation (required)" %><%= resource.errors[:password_confirmation].join(', ')%>
- <%= f.password_field :password_confirmation, autocomplete: "off", required: true %> -
-
- -
- +
+ <%= f.label :beta_email_communication do %> + <%= f.check_box :beta_email_communication, checked: false %> + I’d like to help test new projects, and be emailed when they’re available. + <% end %>
-
<%= f.submit "Sign up" %>
+ <%= f.submit "Create account", class: 'btn btn-primary' %> <% end %> +
+
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index d6d57a0cc..fbda518fa 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,23 +1,25 @@ -
-

Sign in

+
+
+

Sign in

- <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: "form form--new-session"}) do |f| %> -
- <%= f.label :login, "Username or Email Address" %>
- <%= f.text_field :login, autofocus: true, required: true %> -
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: {class: "form form--new-session"}) do |f| %> +
+ <%= f.label :login, "Username or Email Address" %>
+ <%= f.text_field :login, autofocus: true, required: true %> +
-
- <%= f.label :password %>
- <%= f.password_field :password, autocomplete: "off" %> -
+
+ <%= f.label :password %>
+ <%= f.password_field :password, autocomplete: "off" %> +
- <% if devise_mapping.rememberable? -%> -
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
- <% end -%> + <% if devise_mapping.rememberable? -%> +
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
+ <% end -%> -
<%= f.submit "Sign in" %>
- <% end %> +
<%= f.submit "Sign in" %>
+ <% end %> - <%= render "devise/shared/links" %> + <%= render "devise/shared/links" %> +
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb index e4d894af5..5cdba81b9 100644 --- a/app/views/devise/shared/_links.erb +++ b/app/views/devise/shared/_links.erb @@ -1,4 +1,4 @@ -