diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts index ed6fdfbafb047a3a184baf7d0904a7542aea07df..c64ffc128254bf233065a0b9db8f6171522814fb 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts @@ -72,6 +72,7 @@ import {UserActionAddPuaControlComponent} from '../../../user-actions/add-pua-co const FILE_TREE_METADATA_TRANSLATE_PATH = 'PROFILE.EDIT_PROFILE.FILE_TREE_METADATA'; +const ADD_PUA_CONTROL_TRANSLATE_PATH = 'USER_ACTION.ADD_PUA_CONTROL'; function constantToTranslate() { this.notificationAjoutMetadonnee = this.translated('.NOTIFICATION_AJOUT_METADONNEE'); @@ -81,6 +82,8 @@ function constantToTranslate() { this.popupValider = this.translated('.POPUP_VALIDER'); this.popupAnnuler = this.translated('.POPUP_ANNULER'); this.popupControlOkLabel = this.translated('.POPUP_CONTROL_OK_BUTTON_LABEL'); + this.popupControlSubTitleDialog = this.translated('.POPUP_CONTROL_SUB_TITLE_DIALOG'); + this.popupControlTitleDialog = this.translated('.POPUP_CONTROL_TITLE_DIALOG'); } @Component({ @@ -566,16 +569,16 @@ export class FileTreeMetadataComponent { } setControlsVues(elements: string[]){ - if(elements.includes("Enumération")){ + if((this.isStandalone && elements.includes("Enumération")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.ENUMERATIONS_LABEL'))){ this.enumerationControl = true; } - if(elements.includes("Expression régulière")){ + if((this.isStandalone && elements.includes("Expression régulière")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.EXPRESSION_REGULIERE_LABEL'))){ this.expressionControl = true; } - if(elements.includes("Longueur Min/Max")){ + if((this.isStandalone && elements.includes("Longueur Min/Max")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.LENGTH_MIN_MAX_LABEL'))){ this.lengthControl = true; } - if(elements.includes("Valeur Min/Max")){ + if((this.isStandalone && elements.includes("Valeur Min/Max")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.VALUE_MIN_MAX_LABEL'))){ this.valueControl = true; } diff --git a/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json b/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json index a10de77cc5272eda636ee5304f061959bd6960b6..d80d2fc91b5e4a3215449c9c0737b6cc98c73357 100644 --- a/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json +++ b/ui/ui-frontend/projects/pastis/src/assets/i18n/en.json @@ -183,7 +183,9 @@ "VALEUR_FIXE": "Fixed value", "COMMENTAIRE": "Comment" }, - "POPUP_CONTROL_OK_BUTTON_LABEL": "ADD CONTROLS" + "POPUP_CONTROL_OK_BUTTON_LABEL": "ADD CONTROLS", + "POPUP_CONTROL_SUB_TITLE_DIALOG": "Add additional controls to", + "POPUP_CONTROL_TITLE_DIALOG": "Please select one or more controls" } }, "LIST_PROFILE": { diff --git a/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json b/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json index 490100c5a0b28d37ef62397d1175f23f14993bca..916462a4e8f7da95366554c5d62aab85212a813b 100644 --- a/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json +++ b/ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json @@ -183,7 +183,9 @@ "VALEUR_FIXE": "Valeur fixe", "COMMENTAIRE": "Commentaire" }, - "POPUP_CONTROL_OK_BUTTON_LABEL": "AJOUTER LES CONTROLES" + "POPUP_CONTROL_OK_BUTTON_LABEL": "AJOUTER LES CONTROLES", + "POPUP_CONTROL_SUB_TITLE_DIALOG": "Ajouter des contrôles supplémentaires à ", + "POPUP_CONTROL_TITLE_DIALOG": "Veuillez séléctionner un ou plusieurs contrôles" } }, "LIST_PROFILE": {