[Koha-bugs] [Bug 23625] ArticleRequestsMandatoryFields* only affects field labels, does not make inputs required

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 16 21:23:19 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23625

--- Comment #1 from Eric Phetteplace <ephetteplace at cca.edu> ---
If it's useful for others, we're using the following snippet in OPACUserJS to
work around this bug:
https://github.com/cca/koha_snippets/blob/master/catalog-js/opac-request-article.js

// fields made mandatory in settings only have <label> with a "required" class
// we need to make their corresponding inputs required, too
if (location.pathname.match('/cgi-bin/koha/opac-request-article.pl')) {
    $('#place-article-request label.required').each((idx, el) => {
        let input = $(el).attr('for')
        $(`#${input}`).prop('required', true)
    })
}

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


More information about the Koha-bugs mailing list