@@ -, +, @@ cataloging validation error message - Edit or create a MARC record in the basic MARC editor. - Submit the form in various states of completion: - If a mandatory and an important field are empty, you should see two error messages at the top. "The following mandatory subfields aren't filled" and "The following important subfields aren’t filled." - If a mandatory OR an important field is empty, you should see a single message. - If it's the important field which is empty, a confirmation will ask if you want to save the record anyway. Test that both answers to this confirmation work correctly. - If no mandatory or important fields are empty the form should submit. --- .../prog/en/modules/cataloguing/addbiblio.tt | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -540,7 +540,7 @@ function PopupMARCFieldDoc(field) { var subfields = new Array(); var tab = new Array(); var label = new Array(); - var flag=0; + var flag = false; var tabflag= new Array(); var StrAlert = "
"; var notFilledClass = "subfield_not_filled"; @@ -609,7 +609,7 @@ function PopupMARCFieldDoc(field) { var tag=tagsubfieldid.substr(0,3); var subfield=tagsubfieldid.substr(3,1); StrAlert += "
  • "+_("Tag %s subfield %s %s in tab %s").format(tag, subfield, formatFieldName( tabflag[tagsubfieldid][1] ), tabflag[tagsubfieldid][2]) + ' ' + _("Go to field") + '
  • '; - flag=1; + flag = true; } } StrAlert += ""; @@ -663,7 +663,7 @@ function PopupMARCFieldDoc(field) { } if(isempty){ - flag = 1; + flag = true; if (mandatory) { mandatoryFields[ arr[0] ] = { importance: "mandatory", @@ -694,7 +694,7 @@ function PopupMARCFieldDoc(field) { StrAlert += ""; } StrAlert += "
    "; - if (flag) { + if ( flag ) { $("#show-errors").html('