Author: danydb
Date: 2012-10-01 23:12:11 +0200 (Mon, 01 Oct 2012)
New Revision: 431

Modified:
   trunk/tools/include/template/search_box.php
Log:
throw an exception instead of a negative return

Modified: trunk/tools/include/template/search_box.php
===================================================================
--- trunk/tools/include/template/search_box.php 2012-10-01 21:10:09 UTC (rev 
430)
+++ trunk/tools/include/template/search_box.php 2012-10-01 21:12:11 UTC (rev 
431)
@@ -19,7 +19,13 @@
 </FORM>
 <script charset="UTF8" lang="javascript">
        function validate() {
-               if ( check_date_id('<?=$idate_start->id?>') == false ) 
{alert('Date de début incorrecte');return false;}
-               if ( check_date_id('<?=$idate_end->id?>') == false ) 
{alert('Date de fin incorrecte');return false;}
+               if ( check_date_id('<?=$idate_start->id?>') == false ) {
+                       alert('Date de début incorrecte');
+                       $('<?=$idate_start->id?>').style.borderColor='red';
+                       return false;}
+               if ( check_date_id('<?=$idate_end->id?>') == false ) {
+                       alert('Date de fin incorrecte');
+                       $('<?=$idate_end->id?>').style.borderColor='red';
+                       return false;}
        }
 </script>
\ No newline at end of file



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu

_______________________________________________
Phpcompta  est un logiciel libre de comptabilit&#233; en ligne 
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to