[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: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.6,1.7 additem.tmpl,1.3,1.4 |
Date: |
Tue, 21 Jan 2003 05:45:39 -0800 |
Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple
In directory
sc8-pr-cvs1:/tmp/cvs-serv6540/koha-tmpl/intranet-tmpl/default/en/acqui.simple
Modified Files:
addbiblio.tmpl additem.tmpl
Log Message:
add in parameters a "check marc" link.
this script checks MARC parameters and try to detect tome errors in
configuration.
currently checks 7 differents things.
The 1.3.3 MARC21 parameters fails miserabily to this test : 3 errors !!!
Index: addbiblio.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** addbiblio.tmpl 18 Dec 2002 10:57:40 -0000 1.6
--- addbiblio.tmpl 21 Jan 2003 13:45:37 -0000 1.7
***************
*** 296,300 ****
var total_errors=0;
// alert(f.field_value.length);
! for (i=0 ; i<f.field_value.length ; i++) {
// alert (f.field_value[i].value);
if (f.field_value[i].value.length==0 &&
f.mandatory[i].value==1) {
--- 296,300 ----
var total_errors=0;
// alert(f.field_value.length);
! for (i=0 ; i<f.field_value.length-2 ; i++) {
// alert (f.field_value[i].value);
if (f.field_value[i].value.length==0 &&
f.mandatory[i].value==1) {
Index: additem.tmpl
===================================================================
RCS file:
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/additem.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** additem.tmpl 12 Dec 2002 16:35:16 -0000 1.3
--- additem.tmpl 21 Jan 2003 13:45:37 -0000 1.4
***************
*** 7,11 ****
</STYLE>
! <form method="post" action="additem.pl">
<table width=100% cellspacing=0 cellpadding=5 border=1>
<tr background="/images/background-mem.gif">
--- 7,11 ----
</STYLE>
! <form method="post" action="additem.pl" name="f">
<table width=100% cellspacing=0 cellpadding=5 border=1>
<tr background="/images/background-mem.gif">
***************
*** 70,73 ****
--- 70,74 ----
<input type="hidden" name="tag" value="<TMPL_VAR
name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR
name="subfield">">
+ <input type="hidden" name="mandatory" value="<TMPL_VAR
name="mandatory">">
</td>
</tr>
***************
*** 76,89 ****
<input type="hidden" name="itemnum" value="<TMPL_VAR name="itemnum">">
<TMPL_IF name="opisadd">
! <input type="submit" value="Add item">
<TMPL_ELSE>
<input type="hidden" name="tag" value="<TMPL_VAR name="itemtagfield">">
<input type="hidden" name="subfield" value="<TMPL_VAR
name="itemtagsubfield">">
<input type="hidden" name="field_value" value="<TMPL_VAR name="itemnum">">
! <input type="submit" value="Modify item">
</TMPL_IF>
</center>
</form>
!
</body>
</html>
--- 77,133 ----
<input type="hidden" name="itemnum" value="<TMPL_VAR name="itemnum">">
<TMPL_IF name="opisadd">
! <input type="button" value="Add item" onClick='Check(this.form)'
accesskey="w">
<TMPL_ELSE>
<input type="hidden" name="tag" value="<TMPL_VAR name="itemtagfield">">
<input type="hidden" name="subfield" value="<TMPL_VAR
name="itemtagsubfield">">
<input type="hidden" name="field_value" value="<TMPL_VAR name="itemnum">">
! <input type="button" value="Modify item" onClick='Check(this.form)'
accesskey="w">
</TMPL_IF>
</center>
</form>
! <script LANGUAGE="JavaScript">
! function active(numlayer)
! {
! for (i=0; i < 10 ; i++ ) {
! ong = i+"XX";
! link = "link"+i;
! if (numlayer==i) {
! document.getElementById(ong).style.visibility="visible";
!
document.getElementById(link).style.backgroundColor="#11AA11";
!
document.getElementById(link).style.backgroundImage="url(/images/background-mem.gif)";
! } else {
! document.getElementById(ong).style.visibility="hidden";
!
document.getElementById(link).style.backgroundColor="#FFFFFF";
! document.getElementById(link).style.backgroundImage="";
! }
! }
! }
! function Check(f) {
! var total_errors=0;
! // alert(f.field_value.length);
! for (i=0 ; i<f.field_value.length ; i++) {
! // alert (f.field_value[i].value);
! if (f.field_value[i].value.length==0 &&
f.mandatory[i].value==1) {
!
document.getElementById("error"+i).style.backgroundColor="#FF0000";
! total_errors++;
! } else {
!
document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
! }
! }
! var alertString2;
! if (total_errors==0) {
! document.f.submit();
! } else {
! alertString2 = "Form not submitted because of the following
problem(s)\n";
! alertString2 +=
"------------------------------------------------------------------------------------\n\n";
! alertString2 += "- "+ total_errors+" mandatory fields empty
(see bold subfields)";
! alert(alertString2);
! }
! }
! function Dopop(link,i) {
! defaultvalue=document.forms[0].field_value[i].value;
! newin=window.open(link+"&result="+defaultvalue,"value
builder",'width=500,height=400,toolbar=false,scrollbars=yes');
! }
! </script>
</body>
</html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.6,1.7 additem.tmpl,1.3,1.4,
Paul POULAIN <=