Bugzilla – Attachment 194325 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.79 KB, created by
Pedro Amorim
on 2026-03-02 11:00:17 UTC
(
hide
)
Description:
Bug 41178: (VueJS framework): Add i18n.deleteConfirmationBody
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2026-03-02 11:00:17 UTC
Size:
3.79 KB
patch
obsolete
>From f73cb584ed6c6353a890f86707ed6a29b6f68dbb 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 | 4 ++-- > .../intranet-tmpl/prog/js/vue/components/SkeletonResource.vue | 3 +++ > .../intranet-tmpl/prog/js/vue/composables/base-resource.js | 4 +++- > 3 files changed, 8 insertions(+), 3 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 bd7ff9b04aa..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, >@@ -170,7 +170,7 @@ export default { > accounts.map(a => a.login_id).join(", ") > ); > } else { >- baseResource.i18n.deleteConfirmationMessage = null; >+ baseResource.i18n.deleteConfirmationBody = null; > } > }; > >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 bbb139a2ed2..6fc72c26137 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 7448bda1873..505b9f6a619 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 >@@ -264,7 +264,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
|
194323
|
194324
| 194325 |
194326