tazbug diff web/lib/functions.js @ rev 9
Add the web interface
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 03 12:12:59 2012 +0200 (2012-04-03) |
parents | |
children | a8652095c93f |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/web/lib/functions.js Tue Apr 03 12:12:59 2012 +0200 1.3 @@ -0,0 +1,18 @@ 1.4 +// SliTaz Bugs Javascript functions. 1.5 +// 1.6 + 1.7 +// Check form to avoid empty values and bad email. 1.8 +function checkNewBug() { 1.9 + if(document.forms["addbug"]["title"].value == "") 1.10 + { 1.11 + alert("Please enter a title for the new bug"); 1.12 + document.forms["addbug"]["title"].focus(); 1.13 + return false; 1.14 + } 1.15 + if(document.forms["addbug"]["desc"].value == "") 1.16 + { 1.17 + alert("Please fill in the bug description"); 1.18 + document.forms["addbug"]["desc"].focus(); 1.19 + return false; 1.20 + } 1.21 +}