Author: danydb
Date: 2012-10-01 22:59:56 +0200 (Mon, 01 Oct 2012)
New Revision: 428

Modified:
   trunk/tools/include/template/search_box.php
Log:
Check date with javascript

Modified: trunk/tools/include/template/search_box.php
===================================================================
--- trunk/tools/include/template/search_box.php 2012-10-01 17:43:08 UTC (rev 
427)
+++ trunk/tools/include/template/search_box.php 2012-10-01 20:59:56 UTC (rev 
428)
@@ -1,4 +1,4 @@
-<FORM METHOD="GET">
+<FORM METHOD="GET" onsubmit="return validate();">
 <?=$hidden?>
 <table>
        <TR>
@@ -16,4 +16,10 @@
 </table>
        <?=HtmlInput::request_to_hidden(array('ac','plugin_code'));?>
 <?=$submit?>
-</FORM>
\ No newline at end of file
+</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;}
+       }
+</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