Index: pro-violet-viettel/sourcecode/application/config/routes.php
===================================================================
--- pro-violet-viettel/sourcecode/application/config/routes.php	(revision 401)
+++ pro-violet-viettel/sourcecode/application/config/routes.php	(revision 402)
@@ -52,4 +52,5 @@
 $route['admin/cong_tac_vien/sua/:any'] = 'admin/collaborator/editUser';
 $route['admin/cong_tac_vien/xoa/:any'] = 'admin/collaborator/deleteUser';
+$route['admin/cong_tac_vien/xoa_cong_tac_vien'] = 'admin/collaborator/dodeleteUser';
 $route['admin/cong_tac_vien/cap_nhat'] = 'admin/collaborator/updateUser';
 
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 401)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 402)
@@ -110,4 +110,5 @@
         {
             unset($input['passwd2']);
+            $input['passwd']=md5($input['activated']);
             $input['activated']=1;
             $input['created_time']=date("Y-m-d H:i:s");
@@ -135,4 +136,20 @@
         $this->load->view('collaborator/editUser',$data);
     }
+    public function dodeleteUser()
+    {
+        $input=$this->input->post();
+        $id=$input['id'];
+        $this->load->model('collabolator_model');
+        $data=$this->collabolator_model->delete($id);
+        $result['success']=1;
+        echo json_encode($result);
+    }
+    public function deleteUser()
+    {
+        $id=$this->uri->segment(4);
+        $this->load->model('collabolator_model');
+        $data=$this->collabolator_model->getCollaborator($id);
+        $this->load->view('collaborator/deleteUser',$data);
+    }
     public function updateUser()
     {
@@ -177,5 +194,5 @@
         {
             unset($input['passwd2']);
-            $input['activated']=1;
+            $input['passwd']=md5($input['activated']);
             $input['updated_time']=date("Y-m-d H:i:s");
             $this->load->model('collabolator_model');
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/index.php	(revision 401)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/index.php	(revision 402)
@@ -185,4 +185,14 @@
                         <div class="help-block"> </div>
                     </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> KÃ­ch hoáº¡t</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type='checkbox' name="activated" checked="checked" value="1"  />
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
 
                     <div class="space-4"></div>
Index: pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js	(revision 401)
+++ pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js	(revision 402)
@@ -70,2 +70,34 @@
     return false;
 }
+function deleteuser(id)
+{
+    $.ajax({
+            url: 'cong_tac_vien/xoa_cong_tac_vien',
+            type: "POST",
+            data: $("#editUser_"+id).serialize(),
+            success: function (data, textStatus, jqXHR)
+            {
+                $result = jQuery.parseJSON(data);
+                    if ($result.success == "1")
+                    {   
+                    filter();
+                    $('#close_delete_'+id).click();
+                    }
+                    else
+                    {
+                        
+                        for(var i =0;i < $result.errors.length;i++)
+                        {
+                          var er= $result.errors[i];
+                          $("#add_user_"+id).append("<div class='error'>"+er+"</div>");
+                        }
+                    }
+
+            },
+            error: function (jqXHR, textStatus, errorThrown)
+            {
+                $(".ajaxloading").hide();
+            }
+        });
+    return false;
+}
