Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/app/login/login-form/login-form.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,24 @@
formControlName="password"
[placeholder]="'labels.placeholders.Enter your password' | translate"
(keyup.enter)="onEnter($event)"
(keydown)="checkCapsLock($event)"
(keyup)="checkCapsLock($event)"
(focus)="checkCapsLock($event)"
(click)="checkCapsLock($event)"
(blur)="isCapsLockOn = false"
/>
<mifosx-m3-icon matIconPrefix name="lock"></mifosx-m3-icon>
@if (isCapsLockOn) {
<mifosx-m3-icon
matSuffix
name="keyboard_capslock"
[matTooltip]="'labels.commons.Caps Lock is on' | translate"
role="status"
aria-live="polite"
[attr.aria-label]="'labels.commons.Caps Lock is on' | translate"
class="caps-lock-warning"
></mifosx-m3-icon>
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
@if (loginForm.controls.password.value && !loading) {
<button
type="button"
Expand Down
10 changes: 9 additions & 1 deletion src/app/login/login-form/login-form.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -184,6 +184,14 @@
}
}

.caps-lock-warning {
/* Use a neutral secondary color instead of error red to avoid confusing users who intended to use Caps Lock */
color: var(--md-sys-color-on-surface-variant, #44474e);
margin-right: 8px;
cursor: help;
opacity: 0.8;
}

// ===== Loading Progress =====
.login-progress {
height: 3px;
Expand Down
12 changes: 12 additions & 0 deletions src/app/login/login-form/login-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export class LoginFormComponent implements OnInit {
oauthEnabled = environment.OIDC.oidcServerEnabled || environment.oauth.enabled;
/** Whether remember me functionality is enabled */
enableRememberMe = environment.enableRememberMe === true;
/** True if Caps Lock is on. */
isCapsLockOn = false;

/**
* Creates login form.
Expand Down Expand Up @@ -159,4 +161,14 @@ export class LoginFormComponent implements OnInit {
onEnter(event: any): void {
this.login();
}

/**
* Checks the state of the Caps Lock key.
* @param {KeyboardEvent | MouseEvent} event - Keyboard or Mouse event.
*/
checkCapsLock(event: any) {
if (event instanceof KeyboardEvent || event instanceof MouseEvent) {
this.isCapsLockOn = event.getModifierState('CapsLock');
}
}
}
9 changes: 4 additions & 5 deletions src/assets/translations/cs-CS.json
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,8 @@
"must be after or equal to start date": "musí být po nebo rovno datu zahájení",
"No classification data available": "Nejsou nalezeny žádná klasifikační data",
"No": "Ne",
"Yes": "Ano"
"Yes": "Ano",
"Caps Lock is on": "Caps Lock je zapnutý"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "Heslo musí obsahovat alespoň 1 znak a ne více než 50 znaků",
Expand Down Expand Up @@ -3381,8 +3382,8 @@
"Create Journal Entry": "Vytvořit položku deníku",
"Create Loan Product": "Vytvořte produkt půjčky",
"Create Loan Originator": "Vytvořit poskytovatele úvěrů",
"View Loan Originator": "Zobrazit poskytovatele úvěrů",
"Edit Loan Originator": "Upravit poskytovatele úvěrů",
"View Loan Originator": "Zobrazit Původce Úvěru",
"Edit Loan Originator": "Upravit Původce Úvěru",
"Create Loans Account": "Vytvořit úvěrový účet",
"Create Near Breach": "Vytvořit Téměř Porušení",
"Create New GL Account": "Tato možnost umožňuje vytvářet nové účty hlavní knihy.",
Expand Down Expand Up @@ -3496,7 +3497,6 @@
"Edit Group": "Upravit skupinu",
"Edit Holidays": "Upravit svátky",
"Edit Hook": "Upravit Hook",
"Edit Loan Originator": "Upravit Původce Úvěru",
"Edit Loan Product": "Upravit produkt půjčky",
"Edit Near Breach": "Upravit Téměř Porušení",
"Edit Notification Configuration": "Upravit konfiguraci oznámení",
Expand Down Expand Up @@ -3894,7 +3894,6 @@
"View Group": "Zobrazit skupinu",
"View Holidays": "Zobrazit svátky",
"View Hook": "Zobrazit Hook",
"View Loan Originator": "Zobrazit Původce Úvěru",
"View Loan Product": "Zobrazit produkt půjčky",
"View Near Breach": "Zobrazit Téměř Porušení",
"View Notification Configuration": "Zobrazit konfiguraci oznámení",
Expand Down
5 changes: 2 additions & 3 deletions src/assets/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,8 @@
"must be after or equal to start date": "muss nach oder gleich dem Startdatum sein",
"No classification data available": "Keine Klassifizierungsdaten gefunden",
"No": "Nein",
"Yes": "Ja"
"Yes": "Ja",
"Caps Lock is on": "Feststelltaste ist aktiviert"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "Das Passwort muss mindestens 1 Zeichen und nicht mehr als 50 Zeichen lang sein",
Expand Down Expand Up @@ -3497,7 +3498,6 @@
"Edit Group": "Gruppe bearbeiten",
"Edit Holidays": "Feiertage bearbeiten",
"Edit Hook": "Hook bearbeiten",
"Edit Loan Originator": "Kreditvermittler bearbeiten",
"Edit Loan Product": "Darlehensprodukt bearbeiten",
"Edit Near Breach": "Beinahe-Verstoss bearbeiten",
"Edit Notification Configuration": "Bearbeiten Sie die Benachrichtigungskonfiguration",
Expand Down Expand Up @@ -3895,7 +3895,6 @@
"View Group": "Gruppe anzeigen",
"View Holidays": "Feiertage anzeigen",
"View Hook": "Haken anzeigen",
"View Loan Originator": "Kreditvermittler anzeigen",
"View Loan Product": "Darlehensprodukt anzeigen",
"View Near Breach": "Beinahe-Verstoss anzeigen",
"View Notification Configuration": "Benachrichtigungskonfiguration anzeigen",
Expand Down
1 change: 1 addition & 0 deletions src/assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@
"Is": "is",
"is required": "is required",
"pass is required": "is required (min length {{min}})",
"Caps Lock is on": "Caps Lock is on",
"least one uppercase": "least one uppercase",
"lowercase and special character": "lowercase and special character",
"must be": "must be",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/es-CL.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@
"must be after or equal to start date": "debe ser posterior o igual a la fecha de inicio",
"No classification data available": "No hay datos de clasificación encontradas",
"No": "No",
"Yes": "Sí"
"Yes": "Sí",
"Caps Lock is on": "El bloqueo de mayúsculas está activado"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "La contraseña debe tener al menos 1 carácter y no más de 50 caracteres",
Expand Down Expand Up @@ -3382,8 +3383,8 @@
"Create Journal Entry": "Crear entrada de diario",
"Create Loan Product": "Crear producto de Crédito",
"Create Loan Originator": "Crear Originador de Créditos",
"View Loan Originator": "Ver Originador de Créditos",
"Edit Loan Originator": "Editar Originador de Créditos",
"View Loan Originator": "Ver Originador de Préstamo",
"Edit Loan Originator": "Editar Originador de Préstamo",
"Create Loans Account": "Crear cuenta de Créditos",
"Create Near Breach": "Crear Cuasi Incumplimiento",
"Create New GL Account": "Esta opción le permite crear nuevas cuentas GL.",
Expand Down Expand Up @@ -3497,7 +3498,6 @@
"Edit Group": "Editar grupo",
"Edit Holidays": "Editar días festivos",
"Edit Hook": "Editar gancho",
"Edit Loan Originator": "Editar Originador de Préstamo",
"Edit Loan Product": "Editar producto de Crédito",
"Edit Near Breach": "Editar Cuasi Incumplimiento",
"Edit Notification Configuration": "Editar configuración de notificación",
Expand Down Expand Up @@ -3896,7 +3896,6 @@
"View Group": "Ver grupo",
"View Holidays": "Ver festivos",
"View Hook": "Ver gancho",
"View Loan Originator": "Ver Originador de Préstamo",
"View Loan Product": "Ver producto de Crédito",
"View Near Breach": "Ver Cuasi Incumplimiento",
"View Notification Configuration": "Ver configuración de notificación",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,8 @@
"must be after or equal to start date": "debe ser posterior o igual a la fecha de inicio",
"No classification data available": "No se encontraron datos de clasificación",
"No": "No",
"Yes": "Sí"
"Yes": "Sí",
"Caps Lock is on": "El bloqueo de mayúsculas está activado"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "La contraseña debe tener al menos 1 carácter y no más de 50 caracteres",
Expand Down Expand Up @@ -3390,8 +3391,8 @@
"Create Journal Entry": "Crear entrada de diario",
"Create Loan Product": "Crear producto de Crédito",
"Create Loan Originator": "Crear Originador de Créditos",
"View Loan Originator": "Ver Originador de Créditos",
"Edit Loan Originator": "Editar Originador de Créditos",
"View Loan Originator": "Ver Originador de Préstamo",
"Edit Loan Originator": "Editar Originador de Préstamo",
"Create Loans Account": "Crear cuenta de Créditos",
"Create Near Breach": "Crear Cuasi Incumplimiento",
"Create New GL Account": "Esta opción le permite crear nuevas cuentas GL.",
Expand Down Expand Up @@ -3505,7 +3506,6 @@
"Edit Group": "Editar grupo",
"Edit Holidays": "Editar días festivos",
"Edit Hook": "Editar gancho",
"Edit Loan Originator": "Editar Originador de Préstamo",
"Edit Loan Product": "Editar producto de Crédito",
"Edit Near Breach": "Editar Cuasi Incumplimiento",
"Edit Notification Configuration": "Editar configuración de notificación",
Expand Down Expand Up @@ -3906,7 +3906,6 @@
"View Group": "Ver grupo",
"View Holidays": "Ver festivos",
"View Hook": "Ver gancho",
"View Loan Originator": "Ver Originador de Préstamo",
"View Loan Product": "Ver producto de Crédito",
"View Near Breach": "Ver Cuasi Incumplimiento",
"View Notification Configuration": "Ver configuración de notificación",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,8 @@
"must be after or equal to start date": "doit être postérieure ou égale à la date de début",
"No classification data available": "Aucune donnée de classification trouvé",
"No": "Non",
"Yes": "Oui"
"Yes": "Oui",
"Caps Lock is on": "Le verrouillage des majuscules est activé"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "Le mot de passe doit contenir au moins 1 caractère et pas plus de 50 caractères",
Expand Down Expand Up @@ -3384,8 +3385,8 @@
"Create Journal Entry": "Créer une entrée de journal",
"Create Loan Product": "Créer un produit de prêt",
"Create Loan Originator": "Créer un courtier en prêts",
"View Loan Originator": "Voir le courtier en prêts",
"Edit Loan Originator": "Modifier le courtier en prêts",
"View Loan Originator": "Afficher l'Initiateur de Prêt",
"Edit Loan Originator": "Modifier l'Initiateur de Prêt",
"Create Loans Account": "Créer un compte de prêts",
"Create Near Breach": "Créer un Quasi-Dépassement",
"Create New GL Account": "Cette option vous permet de créer de nouveaux comptes GL.",
Expand Down Expand Up @@ -3499,7 +3500,6 @@
"Edit Group": "Modifier le groupe",
"Edit Holidays": "Modifier les jours fériés",
"Edit Hook": "Modifier le crochet",
"Edit Loan Originator": "Modifier l'Initiateur de Prêt",
"Edit Loan Product": "Modifier le produit de prêt",
"Edit Near Breach": "Modifier un Quasi-Dépassement",
"Edit Notification Configuration": "Modifier la configuration des notifications",
Expand Down Expand Up @@ -3897,7 +3897,6 @@
"View Group": "Afficher le groupe",
"View Holidays": "Voir les jours fériés",
"View Hook": "Voir le crochet",
"View Loan Originator": "Afficher l'Initiateur de Prêt",
"View Loan Product": "Voir le produit de prêt",
"View Near Breach": "Afficher un Quasi-Dépassement",
"View Notification Configuration": "Afficher la configuration des notifications",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@
"must be after or equal to start date": "deve essere successiva o uguale alla data di inizio",
"No classification data available": "Nessun dato di classificazione trovato",
"No": "NO",
"Yes": "SÌ"
"Yes": "SÌ",
"Caps Lock is on": "Il blocco maiuscole è attivo"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "La password deve contenere almeno 1 carattere e non più di 50 caratteri",
Expand Down Expand Up @@ -3380,8 +3381,8 @@
"Create Journal Entry": "Crea voce di diario",
"Create Loan Product": "Crea prodotto di prestito",
"Create Loan Originator": "Crea originatore di prestiti",
"View Loan Originator": "Visualizza originatore di prestiti",
"Edit Loan Originator": "Modifica originatore di prestiti",
"View Loan Originator": "Visualizza Originatore Prestito",
"Edit Loan Originator": "Modifica Originatore Prestito",
"Create Loans Account": "Crea un conto prestiti",
"Create Near Breach": "Crea Quasi Violazione",
"Create New GL Account": "Questa opzione ti consente di creare nuovi account GL.",
Expand Down Expand Up @@ -3495,7 +3496,6 @@
"Edit Group": "Modifica gruppo",
"Edit Holidays": "Modifica festività",
"Edit Hook": "Modifica gancio",
"Edit Loan Originator": "Modifica Originatore Prestito",
"Edit Loan Product": "Modifica prodotto di prestito",
"Edit Near Breach": "Modifica Quasi Violazione",
"Edit Notification Configuration": "Modifica configurazione di notifica",
Expand Down Expand Up @@ -3894,7 +3894,6 @@
"View Group": "Visualizza gruppo",
"View Holidays": "Visualizza festività",
"View Hook": "Visualizza gancio",
"View Loan Originator": "Visualizza Originatore Prestito",
"View Loan Product": "Visualizza il prodotto di prestito",
"View Near Breach": "Visualizza Quasi Violazione",
"View Notification Configuration": "Visualizza la configurazione delle notifiche",
Expand Down
5 changes: 2 additions & 3 deletions src/assets/translations/ko-KO.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@
"must be after or equal to start date": "시작 날짜 이후이거나 같아야 합니다",
"No classification data available": "분류 데이터를 사용할 수 없습니다",
"No": "아니요",
"Yes": "예"
"Yes": "예",
"Caps Lock is on": "Caps Lock이 켜져 있습니다"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "비밀번호는 최소 1자 이상 50자 이하여야 합니다",
Expand Down Expand Up @@ -3495,7 +3496,6 @@
"Edit Group": "그룹 편집",
"Edit Holidays": "공휴일 수정",
"Edit Hook": "후크 편집",
"Edit Loan Originator": "대출 담당자 수정",
"Edit Loan Product": "대출상품 수정",
"Edit Near Breach": "근접 위반 수정",
"Edit Notification Configuration": "알림 구성 편집",
Expand Down Expand Up @@ -3894,7 +3894,6 @@
"View Group": "그룹 보기",
"View Holidays": "휴일 보기",
"View Hook": "후크 보기",
"View Loan Originator": "대출 담당자 보기",
"View Loan Product": "대출상품 보기",
"View Near Breach": "근접 위반 보기",
"View Notification Configuration": "알림 구성 보기",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/lt-LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@
"must be after or equal to start date": "turi būti po pradžios datos arba jai lygi",
"No classification data available": "Nėra klasifikacijos duomenų",
"No": "Ne",
"Yes": "Taip"
"Yes": "Taip",
"Caps Lock is on": "Caps Lock įjungtas"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "Slaptažodis turi būti ne mažiau kaip 1 simbolis ir ne daugiau kaip 50 simbolių",
Expand Down Expand Up @@ -3380,8 +3381,8 @@
"Create Journal Entry": "Sukurti žurnalo įrašą",
"Create Loan Product": "Sukurti paskolos produktą",
"Create Loan Originator": "Sukurti paskolos teikėją",
"View Loan Originator": "Peržiūrėti paskolos teikėją",
"Edit Loan Originator": "Redaguoti paskolos teikėją",
"View Loan Originator": "Peržiūrėti Paskolos Teikėją",
"Edit Loan Originator": "Redaguoti Paskolos Teikėją",
"Create Loans Account": "Sukurti paskolų sąskaitą",
"Create Near Breach": "Sukurti Beveik Pažeidimą",
"Create New GL Account": "Ši parinktis leidžia kurti naujas GL paskyras.",
Expand Down Expand Up @@ -3495,7 +3496,6 @@
"Edit Group": "Redaguoti grupę",
"Edit Holidays": "Redaguoti šventes",
"Edit Hook": "Redaguoti kabliuką",
"Edit Loan Originator": "Redaguoti Paskolos Teikėją",
"Edit Loan Product": "Redaguoti paskolos produktą",
"Edit Near Breach": "Redaguoti Beveik Pažeidimą",
"Edit Notification Configuration": "Redaguoti pranešimų konfigūraciją",
Expand Down Expand Up @@ -3894,7 +3894,6 @@
"View Group": "Peržiūrėti grupę",
"View Holidays": "Žiūrėti šventes",
"View Hook": "Žiūrėti kabliuką",
"View Loan Originator": "Peržiūrėti Paskolos Teikėją",
"View Loan Product": "Peržiūrėkite paskolos produktą",
"View Near Breach": "Peržiūrėti Beveik Pažeidimą",
"View Notification Configuration": "Peržiūrėkite pranešimų konfigūraciją",
Expand Down
9 changes: 4 additions & 5 deletions src/assets/translations/lv-LV.json
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,8 @@
"must be after or equal to start date": "jābūt pēc sākuma datuma vai vienādam ar to",
"No classification data available": "Nav pieejami klasifikācijas dati",
"No": "Nē",
"Yes": "Jā"
"Yes": "Jā",
"Caps Lock is on": "Caps Lock ir ieslēgts"
},
"passwordPreferences": {
"Password most be at least 1 character and not more that 50 characters long": "Parolei jābūt vismaz 1 rakstzīmei un ne vairāk kā 50 rakstzīmēm",
Expand Down Expand Up @@ -3379,8 +3380,8 @@
"Create Journal Entry": "Izveidojiet žurnāla ierakstu",
"Create Loan Product": "Izveidojiet aizdevuma produktu",
"Create Loan Originator": "Izveidot aizdevuma izsniedzēju",
"View Loan Originator": "Skatīt aizdevuma izsniedzēju",
"Edit Loan Originator": "Rediģēt aizdevuma izsniedzēju",
"View Loan Originator": "Skatīt Aizdevuma Izsniedzēju",
"Edit Loan Originator": "Rediģēt Aizdevuma Izsniedzēju",
"Create Loans Account": "Izveidojiet aizdevuma kontu",
"Create Near Breach": "Izveidot Gandrīz Pārkāpumu",
"Create New GL Account": "Šī opcija ļauj izveidot jaunus GL kontus.",
Expand Down Expand Up @@ -3495,7 +3496,6 @@
"Edit Group": "Rediģēt grupu",
"Edit Holidays": "Rediģēt brīvdienas",
"Edit Hook": "Rediģēt Āķi",
"Edit Loan Originator": "Rediģēt Aizdevuma Izsniedzēju",
"Edit Loan Product": "Rediģēt aizdevuma produktu",
"Edit Near Breach": "Rediģēt Gandrīz Pārkāpumu",
"Edit Notification Configuration": "Rediģēt paziņojumu konfigurāciju",
Expand Down Expand Up @@ -3894,7 +3894,6 @@
"View Group": "Skatīt grupu",
"View Holidays": "Skatīt brīvdienas",
"View Hook": "Skatīt Āķi",
"View Loan Originator": "Skatīt Aizdevuma Izsniedzēju",
"View Loan Product": "Skatīt aizdevuma produktu",
"View Near Breach": "Skatīt Gandrīz Pārkāpumu",
"View Notification Configuration": "Skatīt paziņojumu konfigurāciju",
Expand Down
Loading