Index: controlies/trunk/Plugins/Hosts.py
===================================================================
--- controlies/trunk/Plugins/Hosts.py	(revision 118)
+++ controlies/trunk/Plugins/Hosts.py	(revision 119)
@@ -353,6 +353,16 @@
 			
 		return { "groups":groups }
 		
+    def getInternalGroups (self):
+		
+		groups = []
+		search = self.ldap.search("cn=INTERNAL,cn=DHCP Config","cn=group*",["cn"])
+		
+		for g in search:
+			groups.append (g[0][1]["cn"][0])
+			
+		return { "groups":groups }		
+		
     def getHostData(self):
 		#self.getUserGroups()
 		if self.type == "thinclient":
Index: controlies/trunk/www/thinclients/form.html
===================================================================
--- controlies/trunk/www/thinclients/form.html	(revision 118)
+++ controlies/trunk/www/thinclients/form.html	(revision 119)
@@ -60,16 +60,7 @@
 		return false;
 	}
 	
-	function searchUsername(){
-		/*if($("#form_data #action").val()=="add")
-			$.post('users','action=searchUsername&name='+$("#form_data #name").val()+'&surname='+$("#form_data #surname").val(), function(data) {
-				var result = $.parseJSON(data);
-				$("#form_data #user").val(result.response);
-			});*/
-	}
 	
-	
-	
 </script>
 
 <form id="form_data" onSubmit="return send();">
Index: controlies/trunk/www/workstation/form.html
===================================================================
--- controlies/trunk/www/workstation/form.html	(revision 118)
+++ controlies/trunk/www/workstation/form.html	(revision 119)
@@ -60,22 +60,22 @@
 		return false;
 	}
 	
-	function searchUsername(){
-		/*if($("#form_data #action").val()=="add")
-			$.post('users','action=searchUsername&name='+$("#form_data #name").val()+'&surname='+$("#form_data #surname").val(), function(data) {
-				var result = $.parseJSON(data);
-				$("#form_data #user").val(result.response);
-			});*/
-	}
 </script>
 
 <form id="form_data" onSubmit="return send();">
 	<input type="hidden" id="action" name="action"/>
 	<input type="hidden" id="type" name="type" value="workstation"/>
+	
+	<p><span id="groupTag">Grupo</span><br>
+		<select id="group" name="group">
+			<option value="none">Seleccione...</option>
+		</select>
+	</p>	
+	
 	<p><span id="nameTag">Nombre del equipo:</span><br><input type="text" id="name" name="name" onChange="searchUsername();"/></p>
-	<p><span id="ipTag">Ip</span><br><input type="text" id="ip" name="ip"/></p>	
+	<p><span id="ipTag">Direcci&oacute;n Ip</span><br><input type="text" id="ip" name="ip"/></p>	
 	<p><span id="macTag">MAC</span><br><input type="text" id="mac" name="mac"/></p>
-	<p><span id="dominioTag">Dominio</span><br><input type="text" id="dominio" name="dominio"/></p>
+	<p><span id="dominioTag">Dominio</span><br><input type="text" id="dominio" name="dominio" value="santaeulalia"/></p>
 
 	<div id="message" style="text-align:center; font-weight:bold; color:red; padding:3px; "></div>
 	<div style="text-align:center;"><button id="saveButton" type="submit" style="width:100px;">Guardar</button>&nbsp;&nbsp;<button type="button" id="cancelButton" style="width:100px;">Cancelar</button></div>
Index: controlies/trunk/www/workstation/index.html
===================================================================
--- controlies/trunk/www/workstation/index.html	(revision 118)
+++ controlies/trunk/www/workstation/index.html	(revision 119)
@@ -132,6 +132,23 @@
 				}).dialog('open');
 			}
 			
+			function getInternalGroups(selected) {
+				$.post('hosts','action=getInternalGroups', function(data) {
+						var result = $.parseJSON(data);
+
+						var selectGrupos = document.getElementById("group");				
+
+						for (i=0;i<result.response.groups.length;i++) {
+							var optn = document.createElement("option");
+							optn.text = result.response.groups[i];
+							optn.value = result.response.groups[i];
+							if (selected==optn.text) 
+								optn.selected = true;
+							selectGrupos.options.add (optn);
+						}
+				});
+			}			
+			
 			function addRecord(){
 
 				$("#dialog-form").html("");
@@ -138,17 +155,21 @@
 				$("#dialog-form").load("workstation/form.html", function() {
 					$("#form_data #action").val("add");
 					$("#form_data #messageForm").html("Todos los campos son obligatorios");					
+					
+					getInternalGroups();
+					
+					x = ($(window).width()-250)/2;
+					y = ($(window).height()-400)/2;
+
+					$("#dialog-form").dialog({
+						resizable: false,
+						position: top,
+						modal: true,
+						title: "Añadir Workstation"
+					}).dialog('option', 'position', [x, y]);
 				});
 
-				x = ($(window).width()-250)/2;
-				y = ($(window).height()-400)/2;
 
-				$("#dialog-form").dialog({
-					resizable: false,
-					position: top,
-					modal: true,
-					title: "Añadir Workstation"
-				}).dialog('option', 'position', [x, y]);
 			}			
 			
 		</script>
Index: controlies/trunk/MainLoop.py
===================================================================
--- controlies/trunk/MainLoop.py	(revision 118)
+++ controlies/trunk/MainLoop.py	(revision 119)
@@ -193,9 +193,14 @@
         	elif request.args['action'][0] == "getThinclientGroups":
 				h = Hosts (l,"","","","","")
 				response = h.getThinclientGroups ()
-				return json.dumps({"response" : response})		
+				return json.dumps({"response" : response})	
 				
+        	elif request.args['action'][0] == "getInternalGroups":
+				h = Hosts (l,"","","","","")
+				response = h.getInternalGroups ()
+				return json.dumps({"response" : response})						
 				
+				
         	elif request.args['action'][0] == "getLTSPServers":
 				h = Hosts (l,"","","","","")
 				response = h.getLTSPServers ()
