diff --git a/app/assets/javascripts/sitewide/form_errors.js b/app/assets/javascripts/sitewide/form_errors.js index 789ce42bc..d7be9bb5b 100644 --- a/app/assets/javascripts/sitewide/form_errors.js +++ b/app/assets/javascripts/sitewide/form_errors.js @@ -16,6 +16,7 @@ * error that can happen/show. */ var renderFormError = function(ev, input, errMsgs, clearErr, errAttributes) { + // console.log(input) clearErr = _.isUndefined(clearErr) ? false : clearErr; errAttributes = _.isUndefined(errAttributes) ? '' : ' ' + errAttributes; var $form = $(input).closest('form'); @@ -37,9 +38,11 @@ var renderFormError = function(ev, input, errMsgs, clearErr, errAttributes) { // Mark error form group var $formGroup = $(input).closest('.form-group'); - if (!$formGroup.hasClass('has-error')) { - $formGroup.addClass('has-error'); - } + $formGroup.each(function() { + if (!$(this).hasClass('has-error')) { + $(this).addClass('has-error'); + } + }); var $errSpan = "' + errorText + '.' + ''; diff --git a/app/assets/stylesheets/shared_styles/elements/input_fields.scss b/app/assets/stylesheets/shared_styles/elements/input_fields.scss index 00c27c3ab..97277c2b4 100644 --- a/app/assets/stylesheets/shared_styles/elements/input_fields.scss +++ b/app/assets/stylesheets/shared_styles/elements/input_fields.scss @@ -53,6 +53,10 @@ } } + input.sci-input-field { + height: 36px !important; + } + .sn-icon { bottom: 6px; position: absolute; @@ -166,4 +170,44 @@ } } } + + &.password-input-container { + .password-icon-wrapper { + position: relative; + + input { + padding-right: 2.4em; + } + } + + .sn-icon { + align-items: center; + display: flex; + height: 100%; + position: absolute; + right: 8px; + top: 50%; + transform: translateY(-50%); + width: 24px; + } + + .help-block { + left: 0; + position: absolute; + width: 100%; + + &:nth-of-type(2) { top: 60px; } + &:nth-of-type(3) { top: 120px; } + } + + &.error::before, + &.has-error { + padding-bottom: 0; + } + + &.has-error { + margin-bottom: inherit; + padding-bottom: 2em; + } + } } diff --git a/app/assets/stylesheets/sign_up.scss b/app/assets/stylesheets/sign_up.scss index 76783bff6..c48b89e6a 100644 --- a/app/assets/stylesheets/sign_up.scss +++ b/app/assets/stylesheets/sign_up.scss @@ -25,12 +25,8 @@ margin-bottom: 24px; } - .sci-input-container:not(.field_with_errors) { - margin-bottom: 24px; - - .minimum-password-length { - @include font-small; - } + .sci-input-container:not(.field_with_errors) .minimum-password-length { + @include font-small; } .sign-up-button { diff --git a/app/views/users/invitations/edit.html.erb b/app/views/users/invitations/edit.html.erb index 1a1214315..c58bb9bd8 100644 --- a/app/views/users/invitations/edit.html.erb +++ b/app/views/users/invitations/edit.html.erb @@ -8,26 +8,30 @@ <%= f.hidden_field :invitation_token %> -
+
+
+
+
<%= t("users.registrations.edit.2fa_modal.disable.description") %>
<%= label_tag :password, t("users.registrations.edit.2fa_modal.disable.password_label") %> -