Index: /extensions/AntiAspi/admin.php
===================================================================
--- /extensions/AntiAspi/admin.php	(revision 31366)
+++ /extensions/AntiAspi/admin.php	(revision 31367)
@@ -30,4 +30,7 @@
     case 'ipban':
 	$ipban = pwg_query("SELECT * FROM " . ANTIASPI_TABLE . ";");
+	
+	$template->func_combine_css(array('id'=>'dst','path'=>ANTIASPI_PATH.'antiaspi.css'));
+	
     $admin_base_url = ANTIASPI_ADMIN . '-ipban';
         if (pwg_db_num_rows($ipban)) {
Index: /extensions/AntiAspi/admin.tpl
===================================================================
--- /extensions/AntiAspi/admin.tpl	(revision 31366)
+++ /extensions/AntiAspi/admin.tpl	(revision 31367)
@@ -1,2 +1,62 @@
+{include file='include/datepicker.inc.tpl'}
+
+{footer_script}
+
+jQuery.fn.banDatepicker = function(settings) {
+  var options = jQuery.extend(true, {
+    showTimepicker: true,
+    cancelButton: false,
+  }, settings || {});
+
+  return this.each(function() {
+    var $this = jQuery(this),
+        originalValue = $this.val(),
+        originalDate,
+        $target = jQuery('[name="'+ $this.data('datepicker') +'"]'),
+        linked = !!$target.length;
+		
+    // init picker
+    $this.datetimepicker(jQuery.extend({
+      dateFormat: linked ? 'DD d MM yy' : 'yy-mm-dd',
+      timeFormat: 'HH:mm:ss',
+      separator: options.showTimepicker ? ' ' : '',
+
+      altField: linked ? $target : null,
+      altFormat: 'yy-mm-dd',
+      altTimeFormat: options.showTimepicker ? 'HH:mm:ss' : '',
+	  	  
+      autoSize: true,
+      changeMonth : true,
+      changeYear: true,
+      altFieldTimeOnly: true,
+      showSecond: true,
+      alwaysSetTime: false,
+	  }, options));
+
+    // autoSize not handled by timepicker
+    if (options.showTimepicker) {
+      $this.attr('size', parseInt($this.attr('size'))+6);
+    }
+  });
+};
+
+jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
+  jQuery('[data-datepickerban]').banDatepicker();
+  });
+
+jQuery(function($) {
+	$('input.dban').each(function(){
+		d = new Date();
+		var datestring = d.getFullYear() + "-" + ("0"+(d.getMonth()+1)).slice(-2) + "-" + ("0" + d.getDate()).slice(-2) + " " + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2) + ":" + ("0" + d.getSeconds()).slice(-2);
+		$(this).val(datestring);
+	});
+	$('input.dban2').each(function(){
+		d = $(this).attr('data-value');;
+		$(this).val(d);
+	});
+});
+
+{/footer_script}
+
 <div class="titrePage">
   <h2>{'AntiAspi'|@translate}</h2>
@@ -8,10 +68,10 @@
 </form>
 {if isset ($ipban_add)}
-	<form method="post" >
+	<form method="post">
 		<fieldset>
 			<legend>{'Add IP ban'|@translate}</legend>
-			<input type="text" name="inserip" value="" size="50" maxlenght="50">
-			<input type="text" name="inserdate" value="" size="20" maxlenght="20">
-			<br>	
+			{'IP'|@translate} <input " type="text" name="inserip" data-ip placeholder="123.123.123.123" value="" size="50" maxlenght="50" required pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$">
+			{'Date'|@translate} <i class="icon-calendar"></i> <input class="dban" type="text" data-datepickerban name="inserdate" size="20" maxlenght="20" readonly>
+			<br>
 			<br>
 				<div style="text-align:center;">
@@ -23,7 +83,7 @@
 <form method="post" >
 	<fieldset>
-		<legend>{'List IP banned'|@translate}</legend>
+	  <legend>{'List IP banned'|@translate}</legend>
 		{foreach from=$ipban2 item=ipban}
-			{$ipban.ID}   {$ipban.IP}   {$ipban.DATE}
+			<!-- {$ipban.ID} -->   {$ipban.IP}   {$ipban.DATE}
 			<a href="{$ipban.U_EDIT}">
 				<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" alt="{'edit'|@translate}" title="{'edit'|@translate}" />
@@ -32,5 +92,5 @@
 				<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" id="btn_delete" alt="{'delete'|@translate}" title="{'Delete'|@translate}" />
 			</a>
-		<br>
+		  <br>
 		{/foreach}
   	</fieldset>
@@ -41,10 +101,10 @@
 			<legend>{'IP banned edit'|@translate}</legend>
 			<input type="hidden" name="invisibleID" value="{$ipban_edit.ID}">
-			<input type="text" name="inserip" value="{$ipban_edit.IP}" size="50" maxlenght="50">
-			<input type="text" name="inserdate" value="{$ipban_edit.DATE}" size="20" maxlenght="20">
+			{'IP'|@translate} <input " type="text" name="inserip" data-ip placeholder="123.123.123.123" value="{$ipban_edit.IP}" size="50" maxlenght="50" required pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$">
+			{'Date'|@translate} <i class="icon-calendar"></i> <input class="dban2" type="text" data-datepickerban name="inserdate" data-value="{$ipban_edit.DATE}" size="20" maxlenght="20">
 			<br>	
 			<br>
 				<div style="text-align:center;">
-				<input class="submit" name="submitaddipban2" type="submit" value="{'Submit'|@translate}" />
+				<input class="submit" name="submitaddipban2" data-ip type="submit" value="{'Submit'|@translate}" />
 				</div>
 		</fieldset>
Index: /extensions/AntiAspi/antiaspi.css
===================================================================
--- /extensions/AntiAspi/antiaspi.css	(revision 31367)
+++ /extensions/AntiAspi/antiaspi.css	(revision 31367)
@@ -0,0 +1,15 @@
+input:required{
+  background:url(aste.jpg) 98% center no-repeat;
+}
+input:focus:invalid{
+  border-color:#FF0000;
+  background-image:none;
+}
+
+input:focus:valid{
+  border-color:#56C93F;
+}
+
+input:valid{
+  background-image:none;
+}
