[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple add
From: |
doXulting |
Subject: |
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.34,1.35 |
Date: |
Thu, 03 Mar 2005 08:10:38 -0800 |
Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25028/koha-tmpl/intranet-tmpl/default/en/acqui.simple
Modified Files:
addbiblio.tmpl
Log Message:
Modified Check function to report to user the name of the missing fields, not
only their number.
Index: addbiblio.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** addbiblio.tmpl 1 Mar 2005 13:40:51 -0000 1.34
--- addbiblio.tmpl 3 Mar 2005 16:10:35 -0000 1.35
***************
*** 422,425 ****
--- 422,427 ----
// Scan for missing mandatory subfields
var total_missing_mandatory_subfields = 0;
+ var missing_mandatory_subfields = new Array();
+
for (i=0 ; i<f.field_value.length-2 ; i++) {
if (f.field_value[i].value.length==0 &&
f.mandatory[i].value==1) {
***************
*** 430,433 ****
--- 432,443 ----
document.getElementById("error"+i).style.backgroundColor="#FF0000";
total_missing_mandatory_subfields++;
+ if
(document.getElementById("error"+i).parentNode.tagName == "B")
+ {
+
missing_mandatory_subfields.push(document.getElementById("error"+i).innerHTML +
" (tab " +
document.getElementById("error"+i).parentNode.parentNode.parentNode.parentNode.id.substr(0,1)
+ ")");
+ }
+ else
+ {
+
missing_mandatory_subfields.push(document.getElementById("error"+i).innerHTML +
" (tab " +
document.getElementById("error"+i).parentNode.parentNode.parentNode.id.substr(0,1)
+ ")");
+ }
}
} else {
***************
*** 439,442 ****
--- 449,454 ----
var total_missing_mandatory_tags = 0;
var seen_mandatory_tag_p = new Array();
+ var missing_mandatory_tags = new Array();
+
for (i=0 ; i<f.field_value.length ; i++) {
var j = f.tag[i].value;
***************
*** 445,448 ****
--- 457,468 ----
seen_mandatory_tag_p[j] = 1;
total_missing_mandatory_tags++;
+ if (document.getElementById("error"+i).parentNode.tagName
== "B")
+ {
+
missing_mandatory_tags.push(document.getElementById("error"+i).innerHTML + "
(tab " +
document.getElementById("error"+i).parentNode.parentNode.parentNode.parentNode.id.substr(0,1)
+ ")");
+ }
+ else
+ {
+
missing_mandatory_tags.push(document.getElementById("error"+i).innerHTML + "
(tab " +
document.getElementById("error"+i).parentNode.parentNode.parentNode.id.substr(0,1)
+ ")");
+ }
}
document.getElementById("error"+i).style.backgroundColor="#ffff00";
***************
*** 456,460 ****
--- 476,488 ----
alertString2 +=
"\n------------------------------------------------------------------------------------\n";
alertString2 += "\n- "+ total_missing_mandatory_tags +_("
mandatory tags 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)");
+ for (i=0; i<missing_mandatory_subfields.length; i++)
+ {
+ alertString2 += "\n--->"+
missing_mandatory_subfields[i];
+ }
alert(alertString2);
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.34,1.35,
doXulting <=