mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
34 lines
843 B
TypeScript
34 lines
843 B
TypeScript
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|
|
|
@Component({
|
|
selector: 'app-save-view-config-dialog',
|
|
templateUrl: './save-view-config-dialog.component.html',
|
|
styleUrls: ['./save-view-config-dialog.component.scss']
|
|
})
|
|
export class SaveViewConfigDialogComponent implements OnInit {
|
|
|
|
constructor(private modal: NgbActiveModal) { }
|
|
|
|
@Output()
|
|
public saveClicked = new EventEmitter()
|
|
|
|
saveViewConfigForm = new FormGroup({
|
|
title: new FormControl(''),
|
|
showInSideBar: new FormControl(false),
|
|
showInDashboard: new FormControl(false),
|
|
})
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
save() {
|
|
this.saveClicked.emit(this.saveViewConfigForm.value)
|
|
}
|
|
|
|
cancel() {
|
|
this.modal.close()
|
|
}
|
|
}
|