[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui newbiblio.tmpl,1.15,1.15.2.1
Paul POULAIN
tipaul at users.sourceforge.net
Mon Feb 28 14:59:30 CET 2005
Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14648/koha-tmpl/intranet-tmpl/default/en/acqui
Modified Files:
Tag: rel_2_2
newbiblio.tmpl
Log Message:
checking for mandatory & non mandatory fields in acquisition
Index: newbiblio.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/newbiblio.tmpl,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -C2 -r1.15 -r1.15.2.1
*** newbiblio.tmpl 2 Dec 2004 16:40:12 -0000 1.15
--- newbiblio.tmpl 28 Feb 2005 13:59:28 -0000 1.15.2.1
***************
*** 6,9 ****
--- 6,12 ----
//collect values
quantity=f.quantity.value
+ if (quantity ==0) {
+ alert("Quantity must be >0");
+ }
discount=f.discount.value
listinc=parseInt(f.listinc.value)
***************
*** 33,37 ****
f.GST.value=GST;
f.total.value=total;
!
}
--- 36,40 ----
f.GST.value=GST;
f.total.value=total;
! return true;
}
***************
*** 39,50 ****
function messenger(X,Y,etc){
! win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
! win.focus();
! win.document.close();
! win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br>");
! win.document.write(etc);
! win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
! win.document.write("</font></body></html>");
}
//-->
--- 42,67 ----
function messenger(X,Y,etc){
! win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
! win.focus();
! win.document.close();
! win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br>");
! win.document.write(etc);
! win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
! win.document.write("</font></body></html>");
}
+
+ function check(f) {
+ quantity=f.quantity.value
+ if (title == "") {
+ alert("Title can't be empty");
+ return false;
+ }
+ if (quantity ==0) {
+ alert("Quantity must be >0");
+ return false;
+ }
+ document.frusin.submit();
+ }
+
//-->
***************
*** 188,192 ****
</p>
<p>
! <input type="submit" value="OK" class="button acquisition">
</p>
</form>
--- 205,209 ----
</p>
<p>
! <input type="button" value="OK" class="button acquisition" onClick="check(this.form)">
</p>
</form>
More information about the Koha-cvs
mailing list