Correction javascript gestion des IPs

This commit is contained in:
Michael RICOIS 2011-01-18 11:13:08 +00:00
parent 09bf822f6e
commit 2f2345978b

View File

@ -55,21 +55,22 @@ $(document).ready(function(){
open: function(event, ui) { $(this).html(text); },
buttons: {
'Ajouter' : function() {
var txt = $('input[name=filtres_ip]').val();
var select = $('#formip input[name=ip0]').val()+'.'+
$('#formip input[name=ip1]').val()+'.'+
$('#formip input[name=ip2]').val()+'.'+
$('#formip input[name=ip3]').val();
var txt = $('input[name=filtres_ip]').val();
console.log(txt);
(txt.length>0) ? txt = txt+';'+select : txt = select;
var txt = '';
var concat = '';
var liste = txt.split(';');
for (item in liste){
(txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item];
concat = concat+liste[item]+' <a href="#" class="deleteIP" id="'+liste[item]+'">Supp</a><br/>';
}
console.log(txt);
$('input[name=filtres_ip]').val(txt);
$('#listeip').html(concat);
$(this).dialog('close');
},
'Fermer': function() { $(this).dialog('close'); }
},
@ -204,7 +205,9 @@ if (isset($_REQUEST['submit'])){
</div>
<div class="fieldgrp">
<label>Date de signature</label>
<div class="field"><input name="dateSignature" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->dateSignature : '';?>" disabled/></div>
<div class="field">
<input name="dateSignature" type="text" value="<?php echo isset($InfosClient) ? $InfosClient->dateSignature : '';?>" /> (AAAA-MM-YY)
</div>
</div>
<div class="fieldgrp">
<label>Type de contrat</label>
@ -370,6 +373,7 @@ if (!empty($texte_ip)){
}
?>
</span>
<br/>
<a href="#" id="addIp">Ajouter une adresse IP</a>
</div>
</div>