[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.1,1.2

Paul POULAIN tipaul at users.sourceforge.net
Fri Oct 25 12:55:49 CEST 2002


Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple
In directory usw-pr-cvs1:/tmp/cvs-serv15970/koha-tmpl/intranet-tmpl/default/en/acqui.simple

Modified Files:
	addbiblio.tmpl 
Log Message:
Road to 1.3.2
* bugfixes and improvements
* manage mandatory MARC subfields
* new table : authorised_values. this table contains categories and authorised values for the category. On MARC management, you can map a subfield to a authorised_values category. If you do this, the subfield can only be filled with a authorised_value of the selected category.
this submit contains everything needed :
* updatedatabase
* admin screens
* "links" management
* creation of a html-list if a subfield is mapped to an authorised value.

Note this is different from authorities support, which will come soon.
The authorised_values is supposed to contains a "small" number of authorised values for a category (less than 50-100). If you enter more authorised values than this, it should be hard to find what you want in a BIG list...

Index: addbiblio.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/addbiblio.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** addbiblio.tmpl	22 Oct 2002 15:52:36 -0000	1.1
--- addbiblio.tmpl	25 Oct 2002 10:55:47 -0000	1.2
***************
*** 1,5 ****
  <TMPL_INCLUDE NAME="acquisitions-top.inc">
  
! <form method="post">
  <table width=100% cellspacing=0 cellpadding=5 border=1>
  <tr background="/images/background-mem.gif">
--- 1,5 ----
  <TMPL_INCLUDE NAME="acquisitions-top.inc">
  
! <form method="post" name="f">
  <table width=100% cellspacing=0 cellpadding=5 border=1>
  <tr background="/images/background-mem.gif">
***************
*** 10,24 ****
  	<table width=100% border=0 colspacing=0 cellpadding=0>
  	<tr>
! 		<td width=9% align="center"><a href="javascript:active(0)"><div id="link0">0xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(1)" ><div id="link1">1xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(2)"><div  id="link2">2xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(3)"><div  id="link3">3xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(4)"><div  id="link4">4xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(5)"><div  id="link5">5xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(6)"><div  id="link6">6xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(7)"><div  id="link7">7xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(8)"><div  id="link8">8xx</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(9)"><div  id="link9">9xx</div></a></td>
! 		<td width=10% align="center"><input type="hidden" name="op" value="addbiblio"><input type="submit" value=">>> items"></td>
  	</tr>
  	</table>
--- 10,24 ----
  	<table width=100% border=0 colspacing=0 cellpadding=0>
  	<tr>
! 		<td width=9% align="center"><a href="javascript:active(0)"><div id="link0">0</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(1)"><div id="link1">1</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(2)"><div id="link2">2</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(3)"><div id="link3">3</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(4)"><div id="link4">4</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(5)"><div id="link5">5</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(6)"><div id="link6">6</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(7)"><div id="link7">7</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(8)"><div id="link8">8</div></a></td>
! 		<td width=9% align="center"><a href="javascript:active(9)"><div id="link9">9</div></a></td>
! 		<td width=10% align="center"><input type="hidden" name="op" value="addbiblio"><input type="button" value=">>> items" onClick='Check(this.form)'></td>
  	</tr>
  	</table>
***************
*** 26,30 ****
  </tr>
  </table>
- 
     <DIV name="0XX" id="0XX" style="position:absolute;left:40px;top:150px;visibility:visible;width:90%">
      <table width=100%  cellspacing=0 cellpadding=5 border=0>
--- 26,29 ----
***************
*** 33,65 ****
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><TMPL_VAR name="subfield"></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
  	</tr>
  	</tmpl_loop>
  	</tmpl_loop>
!      </table>
!      </DIV>
  
!     <DIV name="1XX" id="1XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="1XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
--- 32,66 ----
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</tmpl_loop>
  	</tmpl_loop>
! 		</table>
! 		</DIV>
  
! 	<DIV name="1XX" id="1XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="1XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
***************
*** 67,246 ****
       </DIV>
  
!     <DIV name="2XX" id="2XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="2XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
         </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="3XX" id="3XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="3XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><<TMPL_IF name="mandatory"></b></TMPL_IF>/td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="4XX" id="4XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="4XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="5XX" id="5XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="5XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
  	<DIV name="6XX" id="6XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="6XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="7XX" id="7XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="7XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="8XX" id="8XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="8XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="9XX" id="9XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="9XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
!     <DIV name="hidden" id="hidden" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
!     <table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="hidden_loop">
  	<tr>
!          <td width="3%">&nbsp;</td>
! 	    <td width="2%"><b><TMPL_VAR name="marc_tag"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<input type="hidden" name="tag[]" value="<TMPL_VAR name="tag">">
! 			<input type="hidden" name="subfield[]" value="<TMPL_VAR name="subfield">">
  		</td>
!        </tr>
  	</TMPL_LOOP>
!      </table>
!      </DIV>
  
  </form>
--- 68,256 ----
       </DIV>
  
! 	<DIV name="2XX" id="2XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="2XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="3XX" id="3XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="3XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><<TMPL_IF name="mandatory"></b></TMPL_IF>/td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="4XX" id="4XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="4XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="5XX" id="5XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="5XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
  	<DIV name="6XX" id="6XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="6XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="7XX" id="7XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100%  cellspacing=0 cellpadding=5 border=0>
  	<TMPL_LOOP name="7XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="8XX" id="8XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=100% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="8XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="9XX" id="9XX" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="9XX">
  	<tr background="/images/background-mem.gif"><td colspan=4><b><tmpl_var name="tag"></td></tr>
  	<TMPL_LOOP name="subfield">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
! 	<DIV name="hidden" id="hidden" style="position:absolute;left:40px;top:150px;visibility:hidden;width:90%">
! 	<table width=90% cellspacing=0 cellpadding=5  border=0>
  	<TMPL_LOOP name="hidden_loop">
  	<tr>
! 		<td width="3%">&nbsp;</td>
! 		<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
  		<td width="55%"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"></b></TMPL_IF></td>
  		<td width="40%">
  			<TMPL_VAR name="marc_value">
! 			<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>
  	</TMPL_LOOP>
! 	</table>
! 	</DIV>
  
  </form>
***************
*** 250,266 ****
  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="";
! }
  }
  }
  </script>
--- 260,296 ----
  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++;
+ 		}
+ 	}
+ 	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);
+ 	}
  }
  </script>





More information about the Koha-cvs mailing list