http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10848
--- Comment #5 from Jonathan Druart <[email protected]> --- Comment on attachment 28721 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28721 Bug 10848 - Allow configuration of mandatory/required fields on the suggestion form in OPAC #1/2 Review of attachment 28721: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10848&attachment=28721) ----------------------------------------------------------------- ::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ +39,5 @@ > <form action="/cgi-bin/koha/opac-suggestions.pl" > method="post"> > <fieldset class="rows"> > <ol> > <li><label class="required" > for="title">Title:</label><input type="text" id="title" name="title" > maxlength="255" /></li> > + <li><label [% IF > (mandatoryfields.author) %]class="required" [% END > %]for="author">Author:</label><input type="text" id="author" name="author" > maxlength="80" /></li> It is not allowed to add template toolkit directives into html tags (see http://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML). @@ +319,5 @@ > _alertString += _("- You must enter a Title") + "\n"; > } > + [% IF (mandatoryfields.author) %]if (f.author.value.length == 0){ > + _alertString += _("- You must enter an Author") + "\n"; > + }[% END %] Maybe it could be better to use the required="required" html attribute on the input element, don't you think? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
