Skip to content

Commit 7ef4bf3

Browse files
committed
Allow soft-delete confirmation without object title
1 parent 09155b3 commit 7ef4bf3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ts/WoltLabSuite/Core/Component/Confirmation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class ConfirmationPrefab {
8181
}
8282

8383
async softDelete(): Promise<ResultSoftDeleteWithoutReason>;
84-
async softDelete(title: string): Promise<ResultSoftDeleteWithoutReason>;
85-
async softDelete(title: string, askForReason: false): Promise<ResultSoftDeleteWithoutReason>;
86-
async softDelete(title: string, askForReason: true): Promise<ResultConfirmationWithReason>;
84+
async softDelete(title: string | undefined): Promise<ResultSoftDeleteWithoutReason>;
85+
async softDelete(title: string | undefined, askForReason: false): Promise<ResultSoftDeleteWithoutReason>;
86+
async softDelete(title: string | undefined, askForReason: true): Promise<ResultConfirmationWithReason>;
8787
async softDelete(
8888
title?: string,
8989
askForReason = false,

ts/WoltLabSuite/Core/Component/Interaction/Confirmation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ export async function handleConfirmation(
2929
customMessage: string = "",
3030
): Promise<ResultConfirmationWithReason> {
3131
if (confirmationType == ConfirmationType.SoftDelete) {
32-
return await confirmationFactory().softDelete(objectName);
32+
return await confirmationFactory().softDelete(objectName ? objectName : undefined);
3333
}
3434

3535
if (confirmationType == ConfirmationType.SoftDeleteWithReason) {
36-
return await confirmationFactory().softDelete(objectName, true);
36+
return await confirmationFactory().softDelete(objectName ? objectName : undefined, true);
3737
}
3838

3939
if (confirmationType == ConfirmationType.Restore) {

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/Confirmation.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)