koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/koha-tmpl/intranet-tmpl/npl/en/acqui.simpl... [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/koha-tmpl/intranet-tmpl/npl/en/acqui.simpl... [dev_week]
Date: Fri, 06 Oct 2006 01:52:19 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/10/06 01:52:19

Modified files:
        koha-tmpl/intranet-tmpl/npl/en/acqui.simple: addbiblio.tmpl 

Log message:
        fix for bug 1198: addbiblio.pl complains of missing required fields, 
but error message is cryptic
        This should be backported to rel_2_2 as well ... and imporved to display
        the tab as well as the field and subfield ... but at least it's 
lesscryptic than before.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/addbiblio.tmpl?cvsroot=koha&only_with_tag=dev_week&r1=1.4.2.15.2.3&r2=1.4.2.15.2.4

Patches:
Index: addbiblio.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/Attic/addbiblio.tmpl,v
retrieving revision 1.4.2.15.2.3
retrieving revision 1.4.2.15.2.4
diff -u -b -r1.4.2.15.2.3 -r1.4.2.15.2.4
--- addbiblio.tmpl      4 Oct 2006 18:36:27 -0000       1.4.2.15.2.3
+++ addbiblio.tmpl      6 Oct 2006 01:52:19 -0000       1.4.2.15.2.4
@@ -169,8 +169,9 @@
        }
 }
 active(0);
+
 function Check(f) {
-       document.body.style.cursor ="wait";
+       document.body.style.cursor = "wait";
        // Scan for nonempty fields
        var field_is_nonempty_p = new Array();
        for (i=0 ; i<f.field_value.length ; i++) {
@@ -195,11 +196,11 @@
                                total_missing_mandatory_subfields++;
                        if (f.field_value[i].parentNode.tagName == "B")
                        {
-                               
missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  
f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + 
")");
+                               
missing_mandatory_subfields.push(f.field_value[i].innerHTML + " ( is B tab " +  
f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + 
")");
                        }
                        else
                        {
-                               
missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  
f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+                               
missing_mandatory_subfields.push(f.field_value[i].innerHTML + " field " + 
f.tag[i].value + " $" +f.subfieldYYY[i].value);
                        }
 
                        }
@@ -221,11 +222,12 @@
                    total_missing_mandatory_tags++;
                    if (f.field_value[i].parentNode.tagName == "B")
                    {
-                               
missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  
f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + 
")");
+                               
missing_mandatory_tags.push(f.field_value[i].innerHTML + " (check tab " +  
f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + 
")");
                    }
                    else
                    {
-                               
missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  
f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+                               
missing_mandatory_tags.push(f.field_value[i].innerHTML + " field " + 
f.tag[i].value);
+                               //+ " (check tab " +  
f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
                        }
                }
                f.field_value[i].className="mandatory";
@@ -235,14 +237,14 @@
        var total_errors = total_missing_mandatory_tags + 
total_missing_mandatory_subfields;
        var alertString2;
        if (total_errors!=0) {
-               alertString2  = _("Form not submitted because of the following 
problem(s)");
+               alertString2  = _("Please fix the following problem(s)");
                alertString2 += 
"\n------------------------------------------------------------------------------------\n";
-               alertString2 += "\n- "+ total_missing_mandatory_tags +_(" 
mandatory tags empty");
+               alertString2 += "\n- "+ total_missing_mandatory_tags +_(" 
mandatory fields empty");
                for (i=0; i<missing_mandatory_tags.length; i++)
                {
                        alertString2 += "\n--->"+ missing_mandatory_tags[i];
                }
-               alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" 
mandatory fields empty (see bold subfields)");
+               alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" 
mandatory subfields empty (see highlighted subfields)");
                for (i=0; i<missing_mandatory_subfields.length; i++)
                {
                        alertString2 += "\n--->"+ 
missing_mandatory_subfields[i];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]