Summary: | Update templates to use Bootstrap styles when alert class comes from the perl script | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Staff interface | Assignee: | Owen Leonard <oleonard> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | gmcharlt, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00
|
|
Circulation function: | |||
Bug Depends on: | 35402 | ||
Bug Blocks: | |||
Attachments: |
Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script
Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script Bug 37732: Fix administration_tasks.t Bug 37732: Fix 'Invalid PIN code' styling for 2FA Bug 37732: (follow-up) Fix some missed instances Bug 37732: (follow-up) Fix some missed instances |
Description
Jonathan Druart
2024-08-26 12:55:37 UTC
Same on admin/categories with "Patron category updated successfully." All of these pages send the dialog class from the script instead of setting it in the template, so each one needs to be adapted to send the classes for Bootstrap 5. acqui/basket.pl acqui/vendor_issues.pl admin/authorised_values.pl admin/authtypes.pl admin/biblio_framework.pl admin/branches.pl admin/categories.pl admin/cities.pl admin/credit_types.pl admin/currency.pl admin/debit_types.pl admin/desks.pl admin/identity_providers.pl admin/ill_batch_statuses.pl admin/itemtypes.pl admin/restrictions.pl admin/searchengine/elasticsearch/mappings.pl admin/smtp_servers.pl circ/pendingreserves.pl opac/opac-shelves.pl svc/letters/preview tools/additional-contents.pl tools/csv-profiles.pl tools/export.pl tools/quotes.pl virtualshelves/shelves.pl Created attachment 170913 [details] [review] Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script Many pages can have alerts that get their style from a variable passed by the script, e.g.: push @messages, { type => 'message', code => 'success_on_update' }; Rather than change these to match Bootstrap 5 styles, I propose we add a copy of the existing Bootstrap style using the existing vocabulary: message -> info alert -> warning error -> danger To test, apply the patch and rebuild CSS for the staff interface and OPAC: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) - Clear your browser cache if necessary. - Navigate to pages which have been updated by this patch. Many pages will implement this kind of alert after saving an edit, especially administration pages, e.g. Administration -> Libraries -> Edit library -> Save. - You can test the various alert classes by adding this HTML to IntranetMainUserBlock and OpacMainUserBlock and viewing the staff interface and OPAC main pages.: <div class="alert alert-danger">A standard Bootstrap danger alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-warning">A standard Bootstrap warning alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-info">A standard Bootstrap info alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-error">A Koha error alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-alert">A Koha alert alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-message">A Koha info alert with <a href="#" class="alert-link">an example link</a>.</div> Sponsored-by: Athens County Public Libraries Created attachment 170968 [details] [review] Bug 37732: Update templates to use Bootstrap styles when alert class comes from the perl script Many pages can have alerts that get their style from a variable passed by the script, e.g.: push @messages, { type => 'message', code => 'success_on_update' }; Rather than change these to match Bootstrap 5 styles, I propose we add a copy of the existing Bootstrap style using the existing vocabulary: message -> info alert -> warning error -> danger To test, apply the patch and rebuild CSS for the staff interface and OPAC: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) - Clear your browser cache if necessary. - Navigate to pages which have been updated by this patch. Many pages will implement this kind of alert after saving an edit, especially administration pages, e.g. Administration -> Libraries -> Edit library -> Save. - You can test the various alert classes by adding this HTML to IntranetMainUserBlock and OpacMainUserBlock and viewing the staff interface and OPAC main pages.: <div class="alert alert-danger">A standard Bootstrap danger alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-warning">A standard Bootstrap warning alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-info">A standard Bootstrap info alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-error">A Koha error alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-alert">A Koha alert alert with <a href="#" class="alert-link">an example link</a>.</div> <div class="alert alert-message">A Koha info alert with <a href="#" class="alert-link">an example link</a>.</div> Sponsored-by: Athens County Public Libraries Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170969 [details] [review] Bug 37732: Fix administration_tasks.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170970 [details] [review] Bug 37732: Fix 'Invalid PIN code' styling for 2FA Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> I think those ones are candidate for a fix here: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt:[% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot delete</strong>: item has a waiting hold.</div>[% END %] koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt: <div id="receipt_sent_dialog" class="dialog warning"> koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt: <div class="dialog [% message.type | html %]"> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt: <div class="dialog [% message.type | html %]"> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt: <div class="dialog"> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt: <div class="dialog dialog-success"> Created attachment 170978 [details] [review] Bug 37732: (follow-up) Fix some missed instances This patch fixes a few templates which I had missed, including some which simply had the wrong classes (instead of getting the wrong class from the perl script). Created attachment 170982 [details] [review] Bug 37732: (follow-up) Fix some missed instances This patch fixes a few templates which I had missed, including some which simply had the wrong classes (instead of getting the wrong class from the perl script). Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Thanks, Owen! Pushed for 24.11! Well done everyone, thank you! |