Bugzilla – Attachment 189036 Details for
Bug 41178
SIP2 module does not notify that linked accounts are deleted when deleting an institution
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41178: (VueJS framework): Add i18n.deleteConfirmationBody
Bug-41178-VueJS-framework-Add-i18ndeleteConfirmati.patch (text/plain), 3.49 KB, created by
Pedro Amorim
on 2025-11-04 15:51:44 UTC
(
hide
)
Description:
Bug 41178: (VueJS framework): Add i18n.deleteConfirmationBody
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-11-04 15:51:44 UTC
Size:
3.49 KB
patch
obsolete
>From 9b10a07dd200029485659b514a6d2041fe89d029 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 4 Nov 2025 12:23:13 -0100 >Subject: [PATCH] Bug 41178: (VueJS framework): Add i18n.deleteConfirmationBody > >Otherwise, we're unable to override the contents of the delete dialog > >This and the previous patch allow fetching related accounts on the fly >when attempting to delete an institutions. This allows to provide a >message stating how many (or which) accounts will be deleted if the >selected institution is deleted. > >The way its implemented applies for both deleting the resource from the >list or from the 'show' page. > >If the institution does not have any associated accounts, the delete >dialog's behavior is the same as it was before. >--- > .../prog/js/vue/components/SIP2/SIP2InstitutionResource.vue | 2 +- > .../intranet-tmpl/prog/js/vue/components/SkeletonResource.vue | 3 +++ > .../intranet-tmpl/prog/js/vue/composables/base-resource.js | 4 +++- > 3 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2InstitutionResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2InstitutionResource.vue >index 17a371ab45b..1a68c4b5a15 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2InstitutionResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/SIP2InstitutionResource.vue >@@ -162,7 +162,7 @@ export default { > }); > > if (accounts.length > 0) { >- baseResource.i18n.deleteConfirmationMessage = $__( >+ baseResource.i18n.deleteConfirmationBody = $__( > "You're removing institution %s. <br> It has %s associated accounts (%s), which will also be removed. Are you sure?" > ).format( > resource.name, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SkeletonResource.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SkeletonResource.vue >index 10444ebeb5b..30986c84bd7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/SkeletonResource.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/SkeletonResource.vue >@@ -88,6 +88,9 @@ export default { > deleteConfirmationMessage: $__( > "Are you sure you want to remove this skeleton?" > ), >+ deleteConfirmationBody: $__( >+ null // "Optional - Dialog content body when deleting a resource. Defaults to resource's nameAttr value" >+ ), > deleteSuccessMessage: $__("Skeleton %s deleted"), > displayName: $__("Skeleton"), > editLabel: $__("Edit skeleton #%s"), >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js >index eead7ca2386..9bfd4614ddf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/composables/base-resource.js >@@ -262,7 +262,9 @@ export function useBaseResource(resourceConfig) { > setConfirmationDialog( > { > title: i18n.deleteConfirmationMessage, >- message: resourceName, >+ message: i18n.deleteConfirmationBody >+ ? i18n.deleteConfirmationBody >+ : resourceName, > accept_label: $__("Yes, delete"), > cancel_label: $__("No, do not delete"), > }, >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41178
:
189034
|
189035
| 189036