Bug #1022: Fix creation of leases with MAC in Vnetworks

This commit is contained in:
Hector Sanjuan committed 2011-12-20 12:45:36 +01:00
1 parent 829d32edc2
commit 5fea81a202
1 file changed
+6 -1
+6 -1
View File
@@ -758,7 +758,12 @@ function setupCreateVNetDialog() {
//for each specified lease we prepare the JSON object
$.each(leases,function(){
leases_obj.push({"ip": $(this).val() });
var lease_str = $(this).val().split(",");
if (lease_str[1])
leases_obj.push({"ip": lease_str[0],
"mac": lease_str[1]});
else
leases_obj.push({"ip": lease_str[0] });
});
//and construct the final data for the request