tazbug annotate 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
rev   line source
pankso@9 1 // SliTaz Bugs Javascript functions.
pankso@9 2 //
pankso@9 3
pankso@9 4 // Check form to avoid empty values and bad email.
pankso@9 5 function checkNewBug() {
pankso@9 6 if(document.forms["addbug"]["title"].value == "")
pankso@9 7 {
pankso@9 8 alert("Please enter a title for the new bug");
pankso@9 9 document.forms["addbug"]["title"].focus();
pankso@9 10 return false;
pankso@9 11 }
pankso@9 12 if(document.forms["addbug"]["desc"].value == "")
pankso@9 13 {
pankso@9 14 alert("Please fill in the bug description");
pankso@9 15 document.forms["addbug"]["desc"].focus();
pankso@9 16 return false;
pankso@9 17 }
pankso@9 18 }