From 6af6a63e15b3875d957dec64e4f8f0bd92f93b4c Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 20 Oct 2015 12:37:01 +0200 Subject: [PATCH] Adds new styles for erase account --- app/assets/stylesheets/admin.scss | 2 +- app/assets/stylesheets/layout.scss | 6 ----- app/views/account/show.html.erb | 5 ++-- .../users/registrations/delete_form.html.erb | 24 ++++++++----------- config/locales/devise_views.en.yml | 11 +++++---- config/locales/devise_views.es.yml | 3 ++- 6 files changed, 22 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 85423df75..107237a54 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -199,7 +199,7 @@ body.admin { font-size: rem-calc(12); &:hover, &:active, &:focus { - border: 0; + border-bottom: 1px dotted white; color: #cf2a0e; } } diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 5e7c189bb..e947fcfd9 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -886,12 +886,6 @@ footer { font-weight: bolder; } } - - form { - .button { - margin-top: rem-calc(24); - } - } } // 08. Forms diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index 8c9be93c7..40cf43a59 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -1,8 +1,9 @@
-
+
<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path, class: "button radius small secondary" %> - <%= link_to t("account.show.erase_account_link"), users_registrations_delete_form_path, class: "button radius small danger" %> +
+ <%= link_to t("account.show.erase_account_link"), users_registrations_delete_form_path, class: "delete" %>
<%= avatar_image(@account, seed: @account.id, size: 60) %> diff --git a/app/views/users/registrations/delete_form.html.erb b/app/views/users/registrations/delete_form.html.erb index 96bb8a4d5..b19fd7e99 100644 --- a/app/views/users/registrations/delete_form.html.erb +++ b/app/views/users/registrations/delete_form.html.erb @@ -6,22 +6,18 @@ url: users_registrations_path, html: { method: :delete }) do |f| %> <%= devise_error_messages! %> -

+ +

<%= t("devise_views.users.registrations.delete_form.info") %> +
+

+ <%= t("devise_views.users.registrations.delete_form.info_reason") %>

-
-
- <%= f.text_field :erase_reason, - autofocus: true, - placeholder: t("devise_views.users.registrations.delete_form.erase_reason_label"), - label: t("devise_views.users.registrations.delete_form.erase_reason_label") %> -
+ <%= f.text_field :erase_reason, + autofocus: true, + placeholder: t("devise_views.users.registrations.delete_form.erase_reason_label"), + label: t("devise_views.users.registrations.delete_form.erase_reason_label") %> -
- <%= f.submit t("devise_views.users.registrations.delete_form.submit"), class: "button radius danger" %> -
-
+ <%= f.submit t("devise_views.users.registrations.delete_form.submit"), class: "button radius alert expand" %> <% end %> - - diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 687513e77..2c7ef86bb 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -59,11 +59,6 @@ en: need_current: "We need your current password to confirm your changes" update_submit: "Update" back_link: "Back" - delete_form: - title: "Erase account" - info: "This action can not be undone. Please make sure this is what you want. If you want, you can leave us a reason (this is not mandatory)" - erase_reason_label: "Reason" - submit: "Erase my account" new: title: "Sign up" username_label: "Username" @@ -82,6 +77,12 @@ en: instructions_1_html: "Please review your email inbox - we have sent you a link to confirm your account." instructions_2_html: "Once you click that link, you will be able to start participating" back_to_index: "Understood, take me back to the home page" + delete_form: + title: "Erase account" + info: "This action can not be undone. Please make sure this is what you want." + info_reason: "If you want, leave us a reason (optional)" + erase_reason_label: "Reason" + submit: "Erase my account" organizations: registrations: new: diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index c6924ea5e..42576b6ff 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -79,7 +79,8 @@ es: back_to_index: "Entendido, volver a la página principal" delete_form: title: "Darme de baja" - info: "Esta acción no se puede deshacer. Una vez que des de baja tu cuenta, no podrás volver a hacer login con ella. Si quieres, puedes informarnos de la razón por la que de tas de baja (no es obligatorio)." + info: "Esta acción no se puede deshacer. Una vez que des de baja tu cuenta, no podrás volver a hacer login con ella." + info_reason: "Si quieres, escribe el motivo por el que te das de baja (opcional)." erase_reason_label: "Razón de la baja" submit: "Borrar mi cuenta" organizations: