@@ -, +, @@ 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 %] -
-
-
NOTE: Only PNG, GIF, JPEG, XPM formats are supported.
+ +
+

NOTE: Only PNG, GIF, JPEG, XPM formats are supported.

    -
  1. -
  2. -
  3. - -
    1. - - [% IF ( filetype == 'image' ) %][% ELSE %] +
    2. +
    3. + +
    4. + [% IF ( filetype == 'image' ) %] +
    5. + [% ELSE %] +
    6. +
    7. + + + Required
    8. -
    -
+
--