Bug 41092 - Some system preferences have target='blank' instead of target='_blank'
Summary: Some system preferences have target='blank' instead of target='_blank'
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Caroline Cyr La Rose
QA Contact: David Nind
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-23 18:59 UTC by Caroline Cyr La Rose
Modified: 2025-10-29 12:57 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the HTML target attribute for some system preference links that open a pop-up window or external link. The link attribute now uses "_blank" instead of "blank", and opens in a new tab for external links, and the same browser window for pop-up windows (modals).
Version(s) released in:
Circulation function:


Attachments
Bug 41092: Some system preferences have target='blank' instead of target='_blank' (8.86 KB, patch)
2025-10-23 19:43 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 41092: Some system preferences have target='blank' instead of target='_blank' (8.91 KB, patch)
2025-10-24 15:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41092: Some system preferences have target='blank' instead of target='_blank' (8.95 KB, patch)
2025-10-24 23:26 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-10-23 18:59:47 UTC
I found this while translating and I've never seen target='blank' before, I've only ever seen target='_blank' (with the underscore).

koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref:            - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/items.html' target='blank'>database columns</a> should be unique in an item:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron modification screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-registration screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-modification screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref:         - "Valid options are the <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> of the borrowers table, separated by | (pipe)."
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref:         - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref:         - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref:         - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a>:"
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref:         - "The following <a href='https://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a>:"
Comment 1 Caroline Cyr La Rose 2025-10-23 19:43:17 UTC
Created attachment 188393 [details] [review]
Bug 41092: Some system preferences have target='blank' instead of target='_blank'

This patch changes target='blank' to target='_blank' in system
preferences.

To test:
1. Apply the patch
2. Check the following system preferences, click on the links,
   make sure every click opens in a new tab
   - UniqueItemFields
   - PatronSelfModificationMandatoryField
   - PatronSelfRegistrationBorrowerMandatoryField
   - PatronSelfRegistrationBorrowerUnwantedField
   - PatronSelfModificationBorrowerUnwantedField
   - EmailFieldPrecedence
   - BorrowerMandatoryField
   - BorrowerUnwantedField
   - PatronQuickAddFields
   - PatronDuplicateMatchingAddFields
Comment 2 Caroline Cyr La Rose 2025-10-23 19:49:38 UTC
For reference, Paul D. sent me this stack overflow answer regarding the difference between blank and _blank. One will open all the clicks in the same tab (it will open a new tab the first time, but then identify that tab as "blank" and open all further clicks in that same one), whereas _blank will open always in a new tab. (... Is how I understand it!)

https://stackoverflow.com/questions/36769460/is-the-underscore-in-target-blank-no-longer-needed
Comment 3 David Cook 2025-10-23 23:02:10 UTC
Good catch. I recently noticed this somewhere in Koha as well I think...
Comment 4 Owen Leonard 2025-10-24 15:44:25 UTC
Created attachment 188413 [details] [review]
Bug 41092: Some system preferences have target='blank' instead of target='_blank'

This patch changes target='blank' to target='_blank' in system
preferences.

To test:
1. Apply the patch
2. Check the following system preferences, click on the links,
   make sure every click opens in a new tab
   - UniqueItemFields
   - PatronSelfModificationMandatoryField
   - PatronSelfRegistrationBorrowerMandatoryField
   - PatronSelfRegistrationBorrowerUnwantedField
   - PatronSelfModificationBorrowerUnwantedField
   - EmailFieldPrecedence
   - BorrowerMandatoryField
   - BorrowerUnwantedField
   - PatronQuickAddFields
   - PatronDuplicateMatchingAddFields

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 David Nind 2025-10-24 23:26:51 UTC
Created attachment 188436 [details] [review]
Bug 41092: Some system preferences have target='blank' instead of target='_blank'

This patch changes target='blank' to target='_blank' in system
preferences.

To test:
1. Apply the patch
2. Check the following system preferences, click on the links,
   make sure every click opens in a new tab
   - UniqueItemFields
   - PatronSelfModificationMandatoryField
   - PatronSelfRegistrationBorrowerMandatoryField
   - PatronSelfRegistrationBorrowerUnwantedField
   - PatronSelfModificationBorrowerUnwantedField
   - EmailFieldPrecedence
   - BorrowerMandatoryField
   - BorrowerUnwantedField
   - PatronQuickAddFields
   - PatronDuplicateMatchingAddFields

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-10-24 23:36:52 UTC
Have changed to a minor bug, instead of an enhancement.

QA script is happy.

One thing I noticed, is that when you press "Save" for any changes in the pop-up windows, you get the notification "Saved preference XXXXX", but the "Save all XXX preferences" button in orange is still highlighted. Clicking that says "nothing to save". Outside the scope of this bug to fix that.
Comment 7 Lucas Gass (lukeg) 2025-10-29 12:43:40 UTC
According to Bugzilla no one wrote this patch and no one QA'd it? 

Fill out the Assignee and QA Contact fields please.
Comment 8 David Nind 2025-10-29 12:57:14 UTC
(In reply to Lucas Gass (lukeg) from comment #7)
> According to Bugzilla no one wrote this patch and no one QA'd it? 
> 
> Fill out the Assignee and QA Contact fields please.

Fields updated.