Bug 26886

Summary: OPAC suggestions: possible duplicate message should stand out more
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: david
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Attachments: Bug 26886: Correct style of alert-error class in the OPAC
Bug 26886: Correct style of alert-error class in the OPAC
Bug 26886: Correct style of alert-error class in the OPAC

Description Katrin Fischer 2020-11-01 12:23:40 UTC
I believe this message was styled differently pre Bootstrap update and stood out a bit more visually.

To test:
- Create a new suggestion in the OPAC for a title named test.
- Create another suggestion for "Test".
- Verify the duplicate message shows and the suggestion is not saved:

A similar document already exists: Test. Click on "Confirm your suggestion" to ignore this message.
Comment 1 Owen Leonard 2020-11-02 13:54:53 UTC
Created attachment 112835 [details] [review]
Bug 26886: Correct style of alert-error class in the OPAC

This patch makes a minor change to the OPAC SCSS so that instances of
"alert-error" classes are styled the same as messages with the Bootstrap
4 "alert-warning" class. This change is simpler than making multiple
changes to scripts and templates.

To test, apply the patch and try to view a single news item in the OPAC
which doesn't exist:

/cgi-bin/koha/opac-main.pl?news_id=XXX

- You should see a warning message with a pale yellow background, "This
  news item does not exist."
- Submit a suggestion, and then submit another suggestion with the
  same title.
  - You should see a warning message, "The suggestion has not been
  added. A suggestion with this title already exists."
Comment 2 David Nind 2020-11-03 11:28:59 UTC
Created attachment 112911 [details] [review]
Bug 26886: Correct style of alert-error class in the OPAC

This patch makes a minor change to the OPAC SCSS so that instances of
"alert-error" classes are styled the same as messages with the Bootstrap
4 "alert-warning" class. This change is simpler than making multiple
changes to scripts and templates.

To test, apply the patch and try to view a single news item in the OPAC
which doesn't exist:

/cgi-bin/koha/opac-main.pl?news_id=XXX

- You should see a warning message with a pale yellow background, "This
  news item does not exist."
- Submit a suggestion, and then submit another suggestion with the
  same title.
  - You should see a warning message, "The suggestion has not been
  added. A suggestion with this title already exists."

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2020-11-03 11:29:38 UTC
Testing note:

- Need to updated the OPAC CSS - see https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface
Comment 4 Katrin Fischer 2020-11-03 21:39:25 UTC
Created attachment 112955 [details] [review]
Bug 26886: Correct style of alert-error class in the OPAC

This patch makes a minor change to the OPAC SCSS so that instances of
"alert-error" classes are styled the same as messages with the Bootstrap
4 "alert-warning" class. This change is simpler than making multiple
changes to scripts and templates.

To test, apply the patch and try to view a single news item in the OPAC
which doesn't exist:

/cgi-bin/koha/opac-main.pl?news_id=XXX

- You should see a warning message with a pale yellow background, "This
  news item does not exist."
- Submit a suggestion, and then submit another suggestion with the
  same title.
  - You should see a warning message, "The suggestion has not been
  added. A suggestion with this title already exists."

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2020-11-04 16:34:11 UTC
Pushed to master for 20.11, thanks to everybody involved!