diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 8be35de..023d573 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -131,8 +131,8 @@ else successfully_updated = current_user.update_with_password(password_update) end - else # potentially unreachable... but I dont like to leave off the else - successfully_updated = current_user.update_with_password(password_update) + else # user did not change their email so no pwd required + successfully_updated = current_user.update_without_password(update_params) end else # password not required successfully_updated = current_user.update_without_password(update_params) diff --git a/app/views/devise/registrations/_personal_details.html.erb b/app/views/devise/registrations/_personal_details.html.erb index 2cd1eaa..94ffde3 100644 --- a/app/views/devise/registrations/_personal_details.html.erb +++ b/app/views/devise/registrations/_personal_details.html.erb @@ -24,11 +24,6 @@
- <%= f.label(:recovery_email, _('Recovery email'), class: 'control-label') %> - <%= f.email_field(:recovery_email, class: "form-control", "aria-required": true, 'data-toggle': "tooltip", title: _('This email will be used to recover your account if you change institutions'), value: @user.recovery_email) %> -
- -
<%= f.label(:password, _('Password'), class: 'control-label') %> <%= f.password_field(:password, class: "form-control", "aria-required": true) %>
diff --git a/app/views/shared/_create_account_form.html.erb b/app/views/shared/_create_account_form.html.erb index 8d619f7..181362f 100644 --- a/app/views/shared/_create_account_form.html.erb +++ b/app/views/shared/_create_account_form.html.erb @@ -29,10 +29,6 @@
- <%= f.label(:recovery_email, _('Recovery Email'), class: "control-label") %> - <%= f.email_field(:recovery_email, class: "form-control", "aria-required": false, "data-validation": 'email') %> -
-
<%= f.label(:password, _('Password'), class: "control-label") %> <%= f.password_field(:password, class: "form-control", "aria-required": true) %>