portico: Improve error messages display on registration page.

Improves the display of error messages on registration page fixing
mis-positioning of error messages and overlapping with other text
in some cases.

Part of: #15750.
This commit is contained in:
Priyansh Garg 2020-08-29 16:11:41 +05:30 committed by Tim Abbott
parent ddc6986824
commit 8dd29f4e99
2 changed files with 8 additions and 7 deletions

View File

@ -46,6 +46,9 @@ $(() => {
element.next(".help-inline.alert.alert-error").remove();
if (element.next().is('label[for="' + element.attr("id") + '"]')) {
error.insertAfter(element.next()).addClass("help-inline alert alert-error");
} else if (element.parent().is('label[for="' + element.attr("id") + '"]')) {
// For checkboxes and radio-buttons
error.insertAfter(element.parent()).addClass("help-inline alert alert-error");
} else {
error.insertAfter(element).addClass("help-inline alert alert-error");
}

View File

@ -478,10 +478,9 @@ html {
font-size: 0.7em;
font-weight: 600;
text-align: left;
height: 0;
line-height: 1.2;
position: relative;
top: -4px;
left: 1px;
}
@ -821,11 +820,6 @@ button#register_auth_button_gitlab {
}
}
#id_team_subdomain-error {
margin-top: 5px;
display: block;
}
#subdomain_section {
.inline-block {
width: 100%;
@ -855,6 +849,10 @@ button#register_auth_button_gitlab {
line-height: 1.2;
}
.help-inline {
display: block;
}
legend {
margin-bottom: 0;