Bug 27991: Message field for OPAC problem reporting should have a maxlength set
authorOwen Leonard <oleonard@myacpl.org>
Thu, 18 Mar 2021 17:59:15 +0000 (17:59 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 25 Apr 2021 14:02:34 +0000 (14:02 +0000)
commit9594f89df2afb531673a2bf818e22f9026fec152
tree7b9ea62333edbfad9f6c325656028686c9db4bee
parentd1a0c834fe04b35fd650f94313a83f5e9b6013f4
Bug 27991: Message field for OPAC problem reporting should have a maxlength set

This patch adds a maxlength attribute to the form field for entering
checkout notes in the OPAC, matching the character limit of the database
column. A note is added to show the 255 character limit.

To test, apply the patch and enable the AllowCheckoutNotes system
preference.

 - Log in to the OPAC as a user who has checkouts.
 - On the "Your summary" page, the "Report a problem" fields should
   have a hint below them, "255 characters maximum."
 - Try entering text in one of the fields. You should not be able to
   enter more than 255 characters:

   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
   nunc mi, fringilla in mauris quis, hendrerit feugiat mi. Sed ultrices
   mollis nulla sit amet faucibus. Sed volutpat augue risus, eu rutrum
   eros commodo eu. Proin rhoncus nisi vitae magna_

 - Test that your submission is saved correctly.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8bb9cb649bf36a650d3b84c29c5c9ddd3b01caa5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8832d917d6bb1e6ee79150ffc4737f6a39dba185)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt