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

FIX #7737 disable import button when editing + fix template file is missing

parent a1fbdbaf
No related branches found
No related tags found
No related merge requests found
...@@ -124,8 +124,8 @@ ...@@ -124,8 +124,8 @@
</ng-container> </ng-container>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<button mat-raised-button color="default" type="button" (click)="$event.stopPropagation();startJnlp()" *ngIf="((creationMode && template.template_style != 'uploadFile' && template.template_style) || (!creationMode && !template.uploadedFile))" [disabled]="lockFound">{{lang.templateEdition}}</button> <button mat-raised-button color="default" type="button" (click)="$event.stopPropagation();startJnlp()" *ngIf="((creationMode && template.template_style != 'uploadFile' && template.template_style) || (!creationMode))" [disabled]="lockFound">{{lang.templateEdition}}</button>
<button mat-raised-button color="default" type="button" (click)="$event.stopPropagation();clickOnUploader('uploadSignFile')" *ngIf="((creationMode && template.template_style && template.template_style == 'uploadFile') || (!creationMode && !template.uploadedFile))">{{lang.importFile}}</button> <button mat-raised-button color="default" type="button" (click)="$event.stopPropagation();clickOnUploader('uploadSignFile')" *ngIf="((creationMode && template.template_style && template.template_style == 'uploadFile') || (!creationMode))" [disabled]="lockFound">{{lang.importFile}}</button>
</div> </div>
</div> </div>
......
...@@ -168,6 +168,7 @@ export class TemplateAdministrationComponent implements OnInit { ...@@ -168,6 +168,7 @@ export class TemplateAdministrationComponent implements OnInit {
} }
uploadFileTrigger(fileInput: any) { uploadFileTrigger(fileInput: any) {
this.template.userUniqueId = null;
if (fileInput.target.files && fileInput.target.files[0]) { if (fileInput.target.files && fileInput.target.files[0]) {
this.template.uploadedFile = {}; this.template.uploadedFile = {};
this.template.uploadedFile.name = fileInput.target.files[0].name; this.template.uploadedFile.name = fileInput.target.files[0].name;
......
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