mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Feature: separate save / save & close buttons (#3575)
* Add setting to decide whether the edit dialog should automatically close on save * Add the actual button to the ui * Revert "Add the actual button to the ui" This reverts commite1f5a8bde0
. * Revert "Add setting to decide whether the edit dialog should automatically close on save" This reverts commitfeef3c909b
. * Add button for save without exit * Correct save button ordering, ensure perms, update translation strings * fix e2e tests * Add unit testing for save / save & close button --------- Update messages.xlf Update document-detail.component.spec.ts Co-Authored-By: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -518,7 +518,7 @@ export class DocumentDetailComponent
|
||||
})
|
||||
}
|
||||
|
||||
save() {
|
||||
save(close: boolean = false) {
|
||||
this.networkActive = true
|
||||
this.documentsService
|
||||
.update(this.document)
|
||||
@@ -527,7 +527,7 @@ export class DocumentDetailComponent
|
||||
next: () => {
|
||||
this.store.next(this.documentForm.value)
|
||||
this.toastService.showInfo($localize`Document saved successfully.`)
|
||||
this.close()
|
||||
close && this.close()
|
||||
this.networkActive = false
|
||||
this.error = null
|
||||
},
|
||||
@@ -535,7 +535,7 @@ export class DocumentDetailComponent
|
||||
this.networkActive = false
|
||||
if (!this.userCanEdit) {
|
||||
this.toastService.showInfo($localize`Document saved successfully.`)
|
||||
this.close()
|
||||
close && this.close()
|
||||
} else {
|
||||
this.error = error.error
|
||||
this.toastService.showError(
|
||||
|
Reference in New Issue
Block a user