Verified Commit 7f28f2dd authored by Chocobozzz's avatar Chocobozzz
Browse files

Warning when using capitalized letter in login

parent 01af6462
......@@ -28,6 +28,10 @@
<div *ngIf="formErrors.username" class="form-error">
{{ formErrors.username }}
</div>
<div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
⚠️ Most email addresses do not include capital letters.
</div>
</div>
<div class="form-group">
......
......@@ -141,6 +141,10 @@ The link will expire within 1 hour.`
this.accordion = instanceAboutAccordion.accordion
}
hasUsernameUppercase () {
return this.form.value['username'].match(/[A-Z]/)
}
private loadExternalAuthToken (username: string, token: string) {
this.isAuthenticatedWithExternalAuth = true
......
......@@ -123,12 +123,16 @@ code {
vertical-align: middle;
}
.form-error {
.form-error,
.form-warning {
display: block;
color: $red;
margin-top: 5px;
}
.form-error {
color: $red;
}
.input-error,
my-input-toggle-hidden ::ng-deep input {
border-color: $red !important;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment