Bug 22575 - Item type administration uses invalid error class for dialog
Summary: Item type administration uses invalid error class for dialog
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-25 17:01 UTC by Owen Leonard
Modified: 2020-06-04 20:32 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22575: Item type administration uses invalid error class for dialog (2.65 KB, patch)
2019-03-26 14:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22575: Item type administration uses invalid error class for dialog (2.72 KB, patch)
2019-03-29 19:00 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 22575: Item type administration uses invalid error class for dialog (2.77 KB, patch)
2019-03-29 19:48 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 22575: Item type administration uses invalid error class for dialog (2.82 KB, patch)
2019-03-31 17:45 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-03-25 17:01:30 UTC
If you try to delete an item type which is in use, the error message you get is displayed in a white dialog with red text. This happens because the message "type" passed from the script is "error," a CSS class which is undefined. The script should send "alert" instead.
Comment 1 Owen Leonard 2019-03-26 14:21:45 UTC Comment hidden (obsolete)
Comment 2 Pierre-Marc Thibault 2019-03-29 19:00:53 UTC Comment hidden (obsolete)
Comment 3 Bin Wen 2019-03-29 19:48:27 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2019-03-31 17:45:51 UTC
Created attachment 87243 [details] [review]
Bug 22575: Item type administration uses invalid error class for dialog

This patch modifies the item types administration script so that it
passes a valid message type to the template, where the type is used as a
CSS class. "Error" is a nonexistent dialog class. It should be "alert."

To test, apply the patch and go to Administration -> Item types.

 - Try to delete an item type which is in use. The style of the error
   dialog should be correct.
 - Try to add an item type using a code which already exists. The error
   should look correct.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Nick Clemens 2019-04-05 13:11:02 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-04-15 10:39:20 UTC
Pushed to 18.11.x for 18.11.05
Comment 7 Lucas Gass 2019-04-15 16:51:23 UTC
backported to 18.05.x for 18.05.12