@@ -, +, @@ non-integer values - Fill out the form with at least the required fields, but put something other than a number if the "Number of issues to display to staff" and "Number of issues to display to the public" with non-numeric characters. - When you click the "Next" button you should get an error message, "Number of issues to display to staff must be a number." - Correct the issues to display to staff field and submit again. - You should get a different error message, "Number of issues to display to the public must be a number." - Correct this field and you should be able to proceed to the next step. --- .../prog/en/modules/serials/subscription-add.tt | 4 ++-- .../intranet-tmpl/prog/js/subscription-add.js | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -246,11 +246,11 @@ fieldset.rows table { clear: none; margin: 0; }
  • - +
  • - +
  • --- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js +++ a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js @@ -68,8 +68,21 @@ function Check_page1() { var bib_exists = $("input[name='title']").val().length; - if (!bib_exists) alert( __("Bibliographic record does not exist!") ); - return bib_exists; + if (!bib_exists){ + alert( __("Bibliographic record does not exist!") ); + return false; + } + + if( isNaN( $("#staffdisplaycount").val() ) ){ + alert( __("Number of issues to display to staff must be a number") ); + return false; + } + if( isNaN( $("#opacdisplaycount").val() ) ){ + alert( __("Number of issues to display to the public must be a number") ); + return false; + } else { + return true; + } } function Check_page2(){ --