diff --git a/app/views/devise/registrations/_password_confirmation.html.erb b/app/views/devise/registrations/_password_confirmation.html.erb index 837b740..cc29f9f 100644 --- a/app/views/devise/registrations/_password_confirmation.html.erb +++ b/app/views/devise/registrations/_password_confirmation.html.erb @@ -13,9 +13,9 @@ diff --git a/lib/assets/javascripts/views/devise/registrations/edit.js b/lib/assets/javascripts/views/devise/registrations/edit.js index 603fc34..e906d4c 100644 --- a/lib/assets/javascripts/views/devise/registrations/edit.js +++ b/lib/assets/javascripts/views/devise/registrations/edit.js @@ -1,5 +1,4 @@ import ariatiseForm from '../../../utils/ariatiseForm'; -import { DISABLE_ORG_COMBO_MESSAGE } from '../../../constants'; import { isObject, isString } from '../../../utils/isType'; import { isValidPassword } from '../../../utils/isValidInputType'; import { addMatchingPasswordValidator, togglisePasswords } from '../../../utils/passwordHelper'; @@ -11,15 +10,6 @@ addMatchingPasswordValidator({ selector: '#password_details_registration_form' }); togglisePasswords({ selector: '#password_details_registration_form' }); - // Disable organisation autocomplete if the user has linked their account to Shibboleth - if ($('.identifier-scheme #unlink-shibboleth').length > 0) { - $('#org-controls #user_org_name').attr('disabled', true) - .attr('data-toggle', 'tooltip') - .attr('title', DISABLE_ORG_COMBO_MESSAGE); - $('#org-controls .combobox-clear-button').hide(); - $('#other_org_toggle a').hide(); - } - // If the user has changed their email address display the password // confirmation modal on form submission $('#personal_details_registration_form [type="submit"]').click((e) => { @@ -44,4 +34,9 @@ $('#password-confirmation #user_current_password').change((e) => { $('#password-confirmation #user_password').val($(e.target).val()); }); + + // Submit the form when the user clicks the confirmation button on the modal + $('#pwd-confirmation').click((e) => { + $(e.target).closest('form').submit(); + }); });