Skip to content

Commit

Permalink
[MOSIP-31930] Displaying the warning message to the input fields when…
Browse files Browse the repository at this point in the history
… the user reaches the max-limit.

Signed-off-by: GurukiranP <[email protected]>
  • Loading branch information
gk-4VII committed Mar 18, 2024
1 parent 7f4189d commit 45f40c8
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
[value]="primaryData[field.name]"
required
/>
<mat-hint *ngIf="field.maxLength === primaryData[field.name].length">
{{'policy.max-limit'|translate}}
</mat-hint>
</mat-form-field>
<mat-form-field style="width:950px" *ngIf="field.showInSingleView === 'true' && field.inputType === 'textarea' && primaryData[field.name] === '{}'">
<textarea
Expand All @@ -37,7 +40,7 @@
id="{{field.name}}"
#keyboardRef
#{{field.name}}
(blur)="captureValue($event, field.name, 'primary')"
(keyup)="captureValue($event, field.name, 'primary')"
matInput
[maxLength]="field.maxLength"
placeholder="{{
Expand All @@ -47,6 +50,9 @@
required={{field.ismandatory}}
rows="7" cols="40"
></textarea>
<mat-hint *ngIf="field.maxLength === primaryData[field.name].length">
{{'policy.max-limit'|translate}}
</mat-hint>
</mat-form-field>
<mat-form-field *ngIf="field.showInSingleView === 'true' && field.inputType === 'dropdown'">
<mat-select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ mat-form-field{
margin-top: 14px;
}

.mat-form-field-appearance-legacy .mat-hint {
color: #ffc107;
}

2 changes: 1 addition & 1 deletion pmp-ui/src/assets/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"primaryLangCode": "eng",
"secondaryLangCode": "ara",
"baseUrl": "https://api-internal.dev.mosip.net/",
"baseUrl": "https://api-internal.dev-staging.mosip.net/",
"pmpUrl":"/",
"version":"v1/"
}
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@
"language": "إنجليزي",
"keyboard-tooltip": "انقر للحصول على لوحة المفاتيح الافتراضية (الإنجليزية)",
"update": "تحديث",
"max-limit": "تم الوصول إلى الحد الأقصى",
"validationMessages": {
"name": {
"required": "اسم السياسة مطلوب",
Expand Down
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"language": "English",
"keyboard-tooltip": "Click for Virtual Keyboard (English)",
"update": "Update",
"max-limit": "Max limit reached",
"validationMessages": {
"name": {
"required": "Policy Name is required",
Expand Down
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
"language": "Anglais",
"keyboard-tooltip": "Cliquez pour le clavier virtuel (anglais)",
"update": "Mise à jour",
"max-limit": "Limite maximale atteinte",
"validationMessages": {
"name": {
"required": "Le nom de la stratégie est requis",
Expand Down
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
"language": "अंग्रेज़ी",
"keyboard-tooltip": "वर्चुअल कीबोर्ड के लिए क्लिक करें (अंग्रेज़ी)",
"update": "अद्यतन",
"max-limit": "अधिकतम सीमा तक पहुँच गया",
"validationMessages": {
"name": {
"required": "पॉलिसी का नाम आवश्यक है",
Expand Down
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
"language": "ಆಂಗ್ಲ",
"keyboard-tooltip": "ವರ್ಚುವಲ್ ಕೀಬೋರ್ಡ್‌ಗಾಗಿ ಕ್ಲಿಕ್ ಮಾಡಿ (ಇಂಗ್ಲಿಷ್)",
"update": "ನವೀಕರಿಸಿ",
"max-limit": "ಗರಿಷ್ಠ ಮಿತಿಯನ್ನು ತಲುಪಿದೆ",
"validationMessages": {
"name": {
"required": "ನೀತಿಯ ಹೆಸರು ಅಗತ್ಯವಿದೆ",
Expand Down
1 change: 1 addition & 0 deletions pmp-ui/src/assets/i18n/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
"language": "ஆங்கிலம்",
"keyboard-tooltip": "மெய்நிகர் விசைப்பலகைக்கு (ஆங்கிலம்) கிளிக் செய்யவும்",
"update": "புதுப்பிக்கவும்",
"max-limit": "அதிகபட்ச வரம்பை எட்டிவிட்டது",
"validationMessages": {
"name": {
"required": "பாலிசியின் பெயர் தேவை",
Expand Down

0 comments on commit 45f40c8

Please sign in to comment.