[Koha-bugs] [Bug 10848] Allow configuration of mandatory/required fields on the suggestion form in OPAC

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 20 13:32:21 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10848

Jacek Ablewicz <ablewicz at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28721|0                           |1
        is obsolete|                            |

--- Comment #7 from Jacek Ablewicz <ablewicz at gmail.com> ---
Created attachment 29091
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29091&action=edit
Bug 10848 - Allow configuration of mandatory/required fields on the suggestion
form in OPAC #1/2

(part #1: changes in opac-suggestions.* script + bootstrap template)

This patch:
- adds a configuration option which allows to define which fields
(apart from the title) should be mandatory for a patron purchase
suggestion form in OPAC
- impoves the method how required form fields are enforced, by
utilising new HTML5 "required" attribute (old method would still be
operational in old/legacy browsers which do not support "required"
attribute properly).

Allowed fields that are configurable as mandatory/not mandatory
for suggestions made via OPAC are: author|copyrightdate|collectiontitle|
isbn|publishercode|place|note|itemtype|patronreason.

Note: this patch only applies to OPAC bootstrap theme.

To test:
1/ Apply patch.
2/ Without 'OPACSuggestionMandatoryFields' option set, OPAC suggestion
form should only require the title field.
3/ Set 'OPACSuggestionMandatoryFields' syspref to (e.g.)
'author|isbn|itemtype'
4/ Note that suggestion form in OPAC now requires 3 more fields
to be entered and/or choosen (they should be labeled in red), and
the user instruction changes slightly ("Form fields labeled in red
are mandatory" ..).
5/ Try to submit some suggestions: for each field which is configured
as mandatory, browser should enforce this field to be filled (in modern,
HTML5 compilant browsers), or (as a fallback mechanism for legacy
browsers) there should be an alert message displayed stating that some
mandatory fields are missing.
6/ In both modern and legacy browsers, unless all mandatory fields
are filled with something, form submission should not be possible.
7/ Repeat test 3-6 for all supported field names configurable
as mandatory.

If possible, "legacy" browser tests should ideally involve IE9 and
(some older version of) Safari, which are rumored to have somehow
questionable reputation regarding "required" HTML attribute support.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list