Added 'Merge into single PDF' checkbox to the download form
This commit is contained in:
parent
a3d6967192
commit
64bc64b630
@ -126,6 +126,12 @@
|
|||||||
Use formatted filename
|
Use formatted filename
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" id="downloadAsSingleFile" formControlName="downloadAsSingleFile" />
|
||||||
|
<label class="form-check-label" for="downloadAsSingleFile" i18n>
|
||||||
|
Merge into single PDF
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,6 +65,7 @@ export class BulkEditorComponent
|
|||||||
downloadFileTypeArchive: new FormControl(true),
|
downloadFileTypeArchive: new FormControl(true),
|
||||||
downloadFileTypeOriginals: new FormControl(false),
|
downloadFileTypeOriginals: new FormControl(false),
|
||||||
downloadUseFormatting: new FormControl(false),
|
downloadUseFormatting: new FormControl(false),
|
||||||
|
downloadAsSingleFile: new FormControl(false),
|
||||||
})
|
})
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -136,7 +137,11 @@ export class BulkEditorComponent
|
|||||||
.get('downloadFileTypeArchive')
|
.get('downloadFileTypeArchive')
|
||||||
.valueChanges.pipe(takeUntil(this.unsubscribeNotifier))
|
.valueChanges.pipe(takeUntil(this.unsubscribeNotifier))
|
||||||
.subscribe((newValue) => {
|
.subscribe((newValue) => {
|
||||||
if (!newValue) {
|
if (newValue && this.downloadForm.get('downloadAsSingleFile').value) {
|
||||||
|
this.downloadForm
|
||||||
|
.get('downloadFileTypeOriginals')
|
||||||
|
.patchValue(false, { emitEvent: false })
|
||||||
|
} else if (!newValue) {
|
||||||
this.downloadForm
|
this.downloadForm
|
||||||
.get('downloadFileTypeOriginals')
|
.get('downloadFileTypeOriginals')
|
||||||
.patchValue(true, { emitEvent: false })
|
.patchValue(true, { emitEvent: false })
|
||||||
@ -146,12 +151,38 @@ export class BulkEditorComponent
|
|||||||
.get('downloadFileTypeOriginals')
|
.get('downloadFileTypeOriginals')
|
||||||
.valueChanges.pipe(takeUntil(this.unsubscribeNotifier))
|
.valueChanges.pipe(takeUntil(this.unsubscribeNotifier))
|
||||||
.subscribe((newValue) => {
|
.subscribe((newValue) => {
|
||||||
if (!newValue) {
|
if (newValue && this.downloadForm.get('downloadAsSingleFile').value) {
|
||||||
|
this.downloadForm
|
||||||
|
.get('downloadFileTypeArchive')
|
||||||
|
.patchValue(false, { emitEvent: false })
|
||||||
|
} else if (!newValue) {
|
||||||
this.downloadForm
|
this.downloadForm
|
||||||
.get('downloadFileTypeArchive')
|
.get('downloadFileTypeArchive')
|
||||||
.patchValue(true, { emitEvent: false })
|
.patchValue(true, { emitEvent: false })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.downloadForm
|
||||||
|
.get('downloadAsSingleFile')
|
||||||
|
.valueChanges.pipe(takeUntil(this.unsubscribeNotifier))
|
||||||
|
.subscribe((newValue) => {
|
||||||
|
if (newValue) {
|
||||||
|
this.downloadForm
|
||||||
|
.get('downloadUseFormatting')
|
||||||
|
.patchValue(false, { emitEvent: false })
|
||||||
|
this.downloadForm.get('downloadUseFormatting').disable()
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.downloadForm.get('downloadFileTypeArchive').value &&
|
||||||
|
this.downloadForm.get('downloadFileTypeOriginals').value
|
||||||
|
) {
|
||||||
|
this.downloadForm
|
||||||
|
.get('downloadFileTypeArchive')
|
||||||
|
.patchValue(false, { emitEvent: false })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.downloadForm.get('downloadUseFormatting').enable()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user