Bug 22550 - OPAC suggestion form doesn't require mandatory fields
Summary: OPAC suggestion form doesn't require mandatory fields
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 13618
Blocks: 22800
  Show dependency treegraph
 
Reported: 2019-03-20 16:16 UTC by Owen Leonard
Modified: 2019-06-02 08:30 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22550: OPAC suggestion form doesn't require mandatory fields (1.43 KB, patch)
2019-03-20 16:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22550: OPAC suggestion form doesn't require mandatory fields (1.52 KB, patch)
2019-03-22 19:05 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 22550: OPAC suggestion form doesn't require mandatory fields (1.57 KB, patch)
2019-03-23 09:32 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 22550: OPAC suggestion form doesn't require mandatory fields (1.62 KB, patch)
2019-03-23 09:39 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 22550: OPAC suggestion form doesn't require mandatory fields (1.68 KB, patch)
2019-03-24 15:20 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-20 16:16:08 UTC
The OPAC suggestion form requires JavaScript to perform validation of mandatory fields. The configuration of required fields is incorrectly escaped with the html filter and thus breaks, breaking validation.

The $raw filter should be used instead.
Comment 1 Owen Leonard 2019-03-20 16:35:14 UTC Comment hidden (obsolete)
Comment 2 Bin Wen 2019-03-22 19:05:19 UTC Comment hidden (obsolete)
Comment 3 ByWater Sandboxes 2019-03-23 09:32:20 UTC Comment hidden (obsolete)
Comment 4 ByWater Sandboxes 2019-03-23 09:39:05 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2019-03-24 15:20:21 UTC
Created attachment 86959 [details] [review]
Bug 22550: OPAC suggestion form doesn't require mandatory fields

Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference 'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>

Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens 2019-03-28 13:29:38 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2019-04-01 10:44:46 UTC
Pushed to 18.11.x for 18.11.05
Comment 8 Lucas Gass 2019-04-01 16:17:15 UTC
this isn't necessary in 18.05, not backporting
Comment 9 Jonathan Druart 2019-04-29 02:12:08 UTC
The usage of raw could be avoided here, I have opened bug 22800 to remove it.