From 566ede9702bb1f2833bc493ae56e360d1febc15e Mon Sep 17 00:00:00 2001 From: Mohamed Bilel Besrour Date: Wed, 16 Oct 2024 20:28:40 +0200 Subject: [PATCH] add warning --- .../programming-exercise-build-configuration.component.html | 6 ++++++ src/main/webapp/i18n/de/programmingExercise.json | 3 ++- src/main/webapp/i18n/en/programmingExercise.json | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html b/src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html index 74da32d65396..91f8e42bb96f 100644 --- a/src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html +++ b/src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html @@ -47,7 +47,13 @@ [ngModel]="envVars" (ngModelChange)="onEnvVarsChange($event)" [pattern]="ENV_VAR_REGEX" + #envVarsInput="ngModel" /> + @if (envVarsInput.invalid && (envVarsInput.dirty || envVarsInput.touched)) { + + }
diff --git a/src/main/webapp/i18n/de/programmingExercise.json b/src/main/webapp/i18n/de/programmingExercise.json index 02d361b75ddb..765330b70caa 100644 --- a/src/main/webapp/i18n/de/programmingExercise.json +++ b/src/main/webapp/i18n/de/programmingExercise.json @@ -695,7 +695,8 @@ }, "envVars": { "title": "Umgebungsvariablen", - "description": "Fügen Sie Umgebungsvariablen zum Docker-Container hinzu. Bitte folgen Sie diesem Format: KEY_1=\"value_1\",KEY_2=\"value_2\". (Max 128 chars)" + "description": "Fügen Sie Umgebungsvariablen zum Docker-Container hinzu. Bitte folgen Sie diesem Format: KEY_1=\"value_1\",KEY_2=\"value_2\". (Max 128 chars)", + "invalid": "Ungültiges Format der Umgebungsvariablen. Bitte folgen Sie dem Format KEY_1=\"value_1\",KEY_2=\"value_2\". Schlüssel und Werte können in einfache oder doppelte Anführungszeichen gesetzt werden." } } }, diff --git a/src/main/webapp/i18n/en/programmingExercise.json b/src/main/webapp/i18n/en/programmingExercise.json index 234b0bce0c57..02d8b11e5798 100644 --- a/src/main/webapp/i18n/en/programmingExercise.json +++ b/src/main/webapp/i18n/en/programmingExercise.json @@ -696,7 +696,8 @@ }, "envVars": { "title": "Environment Variables", - "description": "Add environment variables to the Docker container. Please follow the following format KEY_1=\"value_1\",KEY_2=\"value_2\". (Max 128 chars)" + "description": "Add environment variables to the Docker container. Please follow the following format KEY_1=\"value_1\",KEY_2=\"value_2\". (Max 128 chars)", + "invalid": "Invalid environment variable format. Please follow the format KEY_1=\"value_1\",KEY_2=\"value_2\". Keys and values can be wrapped in single or double quotes." } } },