@@ -, +, @@ and the file upload marked as required. with an empty card number field is blocked and the card number field is marked as required. correctly. --- .../prog/en/modules/tools/picture-upload.tt | 47 ++++++++++++++------ 1 file changed, 33 insertions(+), 14 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt @@ -9,6 +9,17 @@ $("#image").click(function(){ $("#cardnum").show(); }); + $( "#upload_form" ).validate({ + rules: { + cardnumber: { + required: { + depends: function(element) { + return $("#image").is(":checked"); + } + } + } + } + }); }); @@ -104,23 +115,31 @@ [% END %] [% END %] -