Skip to content
Snippets Groups Projects
Commit 136745d2 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #11691 TIME 0:20 add alert modal if toggle new version

parent 7fe44269
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
<div class="attachment-form">
<div class="attachment-form-item">
<mat-slide-toggle [checked]="newVersion" color="primary"
(change)="newVersion = !newVersion">Nouvelle version</mat-slide-toggle>
(change)="toggleNewVersion()">{{lang.newVersion}}</mat-slide-toggle>
</div>
<div class="attachment-form-item">
<mat-form-field class="input-form">
......
......@@ -12,6 +12,7 @@ import { DocumentViewerComponent } from '../../viewer/document-viewer.component'
import { PrivilegeService } from '../../../service/privileges.service';
import { HeaderService } from '../../../service/header.service';
import { ConfirmComponent } from '../../../plugins/modal/confirm.component';
import { AlertComponent } from '../../../plugins/modal/alert.component';
@Component({
selector: 'app-attachment-page',
......@@ -242,4 +243,11 @@ export class AttachmentPageComponent implements OnInit {
})
).subscribe();
}
toggleNewVersion() {
if(!this.newVersion) {
this.dialog.open(AlertComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.information, msg: this.lang.mustEditDocument } });
}
this.newVersion = !this.newVersion;
}
}
\ No newline at end of file
......@@ -1321,4 +1321,7 @@ export const LANG_EN = {
"saveModifiedData": "Do you want to save modified data ?",
"dataUpdated": "Data updated",
"canUpdateData": "Can update resource data",
"newVersion": "New version",
"information": "Information",
"mustEditDocument": "You must <b>edit</b> document in order to <b>validate</b> modifications.",
};
......@@ -1359,4 +1359,7 @@ export const LANG_FR = {
"saveModifiedData": "Voulez-vous sauvegarder les modifications ?",
"dataUpdated": "Données modifiées",
"canUpdateData": "Pouvoir modifier les métadonnées du courrier",
"newVersion": "Nouvelle version",
"information": "Information",
"mustEditDocument": "Vous devez <b>éditer</b> votre document afin de pouvoir <b>valider</b> vos modifications.",
};
......@@ -1346,4 +1346,7 @@ export const LANG_NL = {
"saveModifiedData": "Do you want to save modified data ?", //_TO_TRANSLATE
"dataUpdated": "Data updated", //_TO_TRANSLATE
"canUpdateData": "Can update resource data", //_TO_TRANSLATE
"newVersion": "New version", //_TO_TRANSLATE
"information": "Information", //_TO_TRANSLATE
"mustEditDocument": "You must <b>edit</b> document in order to <b>validate</b> modifications.", //_TO_TRANSLATE
};
<div class="modalContent">
<h1 mat-dialog-title>{{data.title}}</h1>
<h1 *ngIf="data.title !== ''" mat-dialog-title>{{data.title}}</h1>
<div *ngIf="data.msg !== ''" mat-dialog-content>
<div class="alert-message alert-message-info" [innerHTML]="data.msg"></div>
</div>
......
......@@ -28,4 +28,9 @@
height: 40px;
font-size: 20px;
color: #666;
}
.alert-message-info {
margin: 0;
font-size: 16px;
}
\ No newline at end of file
......@@ -29,4 +29,9 @@
height: 40px;
font-size: 20px;
color: #666;
}
.alert-message-info {
margin: 0;
font-size: 16px;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment