Index: controlies/trunk/applications/controlies/views/thinclients/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/thinclients/index.html	(revision 214)
+++ controlies/trunk/applications/controlies/views/thinclients/index.html	(revision 215)
@@ -142,13 +142,11 @@
             });
     }
     
-    function modifyRecord(){
-                    var uid;
-    
+    function modifyRecord(){    
                     jQuery("#messageLoading").show();
                     
-                    var uid = rowSelected();
-                    if(uid==false)
+                    var name = rowSelected();
+                    if(name==false)
                         return false;
     
                     jQuery("#dialog-form").html("").css("display","none");
@@ -155,29 +153,15 @@
                     jQuery("#dialog-form").load("form.html", function() {                        
                         
                         jQuery("#form_data #action").val("modify");
-                        jQuery("#form_data #user").attr("readonly","true");
-                        jQuery("#form_data #user").css("background-color","#DDD");
+                        jQuery("#form_data #name").attr("readonly","true");
+                        jQuery("#form_data #name").css("background-color","#DDD");
                         jQuery("#form_data #messageForm").html("Todos los campos son obligatorios");
                         
-                        jQuery.post('call/json/getHostData',{ username: uid }, function(result) {
-                            //var result = jQuery.parseJSON(data);
+                        jQuery.post('call/json/getHostData',{ name: name }, function(result) {
     
-                            jQuery("#form_data #type").replaceWith(textType+"<input type='hidden' id='type' name='type' value='"+result.response['type']+"'/>");
-                            jQuery("#form_data #name").val(result.response['name']);
-                            jQuery("#form_data #nif").val(result.response['nif']);       
-                            jQuery("#form_data #user").val(result.response['user']);
-                            jQuery("#form_data #surname").val(result.response['surname']);
-                            if (result.response['photo']!='')
-                                jQuery("#form_data #photo").attr("src","data:image/png;base64,"+result.response['photo']);                       
+                            jQuery("#form_data #name").val(result.response['cn']);
+                            jQuery("#form_data #mac").val(result.response['mac']);       
     
-                            $.each(result.response['groups']['departments'], function(i, l){
-                                jQuery('#form_data input:checkbox[value='+l+']').attr('checked', true);                          
-                            });
-    
-                            $.each(result.response['groups']['classrooms'], function(i, l){
-                                jQuery('#form_data input:checkbox[value='+l+']').attr('checked', true);                          
-                            });                     
-    
                             x = (jQuery(window).width()-300)/2;
                             y = (jQuery(window).height()-500)/2;
                             
Index: controlies/trunk/applications/controlies/controllers/thinclients.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/thinclients.py	(revision 214)
+++ controlies/trunk/applications/controlies/controllers/thinclients.py	(revision 215)
@@ -5,19 +5,10 @@
 #equivalente a list
     return dict(message="hello from thinclients.py")
     
-@service.json    
-def getThinclientGroups():
-    l=conecta()
-    h = Hosts (l,"","","","")
-    response = h.getThinclientGroups()
-    l.close()
-    return dict(response=response)
-
-
 @service.json
 def getHostData():
     l=conecta()
-    h = Hosts(l,request.vars['cn'],"","",request.vars['type_host'])
+    h = Thinclients(l,request.vars['name'],"")
     response = h.getHostData()    
     l.close()
     return dict(response=response)
@@ -24,16 +15,6 @@
     
 @service.json   
 @auth.requires_login()
-def list_ltspservers():
-    l=conecta()
-    h = Hosts (l,"","","","")
-    response = h.getLTSPServers()
-    l.close()
-    return response    
-   
-   
-@service.json   
-@auth.requires_login()
 def list():
     l=conecta()
     h = Thinclients (l,"","")
@@ -65,21 +46,6 @@
 def form():
     return dict()
 
-def ltspservers():
-    return dict()
-    
-def workstations():
-    return dict()    
-
-def thinclients():
-    return dict()  
-    
-def form_thinclient():
-    return dict()
-
-def form_ltspserver():
-    return dict()
-
 def call():
     """
     exposes services. for example:
Index: controlies/trunk/applications/controlies/modules/Thinclients.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Thinclients.py	(revision 214)
+++ controlies/trunk/applications/controlies/modules/Thinclients.py	(revision 215)
@@ -59,9 +59,6 @@
                 return "macAlreadyExists"
 
         elif action == "modify":
-            if self.groupOverflow(300):
-                return "groupOverflow"
-
             if not self.equalMAC():
 				if self.existsMAC():
 					return "macAlreadyExists"
@@ -151,8 +148,7 @@
 		('dhcpHWAddress', ['ethernet ' + self.mac] )
 		]		
 		group = self.getFreeGroup()
-
-		print group["freeGroup"]
+		
 		self.ldap.add("cn="+self.name +",cn="+group["freeGroup"]+",cn=THINCLIENTS,cn=DHCP Config", attr)
             
 		return "OK"
@@ -160,7 +156,7 @@
     def modify(self):
 
         attr = [(ldap.MOD_REPLACE, 'dhcpHWAddress', ['ethernet ' + self.mac])]
-        self.ldap.modify("cn="+self.name+",cn="+self.group+",cn=THINCLIENTS,cn=DHCP Config", attr)
+        self.ldap.modify("cn="+self.name+",cn="+self.getGroup()+",cn=THINCLIENTS,cn=DHCP Config", attr)
 
         return "OK"
 
@@ -189,8 +185,8 @@
         return False
 
     def equalMAC(self):
-        result = self.ldap.search("ou=hosts","cn="+self.name,["macAddress"])
-        if result[0][0][1]['macAddress'][0] == self.mac:
+        result = self.ldap.search("cn=THINCLIENTS,cn=DHCP Config","cn="+self.name,["dhcpHWAddress"])
+        if result[0][0][1]['dhcpHWAddress'][0].replace ("ethernet ", "") == self.mac:
             return True
         
         return False
@@ -199,7 +195,16 @@
     def getName (self):
         return self.mac   
 
+    def getHostData(self):
+        g = self.getGroup()
+        result = self.ldap.search("cn="+g+",cn=THINCLIENTS,cn=DHCP Config","cn="+self.name,["cn","dhcpHWAddress"])
 
+        dataHost = {
+            "cn":self.name,
+            "mac":result[0][0][1]["dhcpHWAddress"][0].replace("ethernet ","")
+        }
+        return dataHost    
+
     def getGroup (self):
         groups = self.getThinclientGroups()        
         for g in groups['groups']:
@@ -220,8 +225,7 @@
 
 
     def groupOverflow(self,group,overflow):
-        search = self.ldap.search("cn="+group+",cn=THINCLIENTS,cn=DHCP Config","cn=*",["cn"])
-        print len(search)        
+        search = self.ldap.search("cn="+group+",cn=THINCLIENTS,cn=DHCP Config","cn=*",["cn"])       
         if len(search)-2 >= overflow:
             return True
                 
