Index: pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js	(revision 884)
+++ pro-violet-viettel/sourcecode/assets/js/admin/collaborator.js	(revision 906)
@@ -9,9 +9,10 @@
 {$(".error").html("");
     $.ajax({
-                url: "cong_tac_vien/them",
+                url: "/admin/cong_tac_vien/them",
                 type: "POST",
                 data: $("#add_user").serialize(),
                 success: function (data, textStatus, jqXHR)
                 {
+					console.log(data);
                     $result = jQuery.parseJSON(data);
                     if ($result.success == "1")
@@ -41,5 +42,5 @@
 {
     $.ajax({
-            url: 'cong_tac_vien/cap_nhat',
+            url: '/admin/cong_tac_vien/cap_nhat',
             type: "POST",
             data: $("#editUser_"+id).serialize(),
@@ -73,5 +74,5 @@
 {
     $.ajax({
-            url: 'cong_tac_vien/xoa_cong_tac_vien',
+            url: '/admin/cong_tac_vien/xoa_cong_tac_vien',
             type: "POST",
             data: $("#editUser_"+id).serialize(),
Index: pro-violet-viettel/sourcecode/assets/js/admin/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 884)
+++ pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 906)
@@ -104,5 +104,5 @@
         {
             result = jQuery.parseJSON(data);	
-			content = "";
+			content = "<option></option>";
 			if (result != null){
 				for (var i in result){
@@ -113,6 +113,7 @@
 					}
 				}
-				$(".form-field-district").html(content);
+				
 			}
+			$(".form-field-district").html(content);
         }
     });
@@ -127,11 +128,11 @@
         {
             result = jQuery.parseJSON(data);
-			content = "";
+			content = "<option></option>";
 			if (result != null){
 				for (var i in result){			
 					content = content + '<option value="' + result[i].district_id + '">'+ result[i].type + " "  + result[i].district_name + '</option>'
 				}
-				$(".form-field-district").html(content);
 			}
+			$(".form-field-district").html(content);
         }
     });
@@ -140,5 +141,4 @@
 $(document).ready(function(){
 	$(".form-field-province").change(function(){
-		//alert("OK");
 		changeEventProvince();
 	});
Index: pro-violet-viettel/sourcecode/assets/js/collaborator/collaborator.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/collaborator/collaborator.js	(revision 884)
+++ pro-violet-viettel/sourcecode/assets/js/collaborator/collaborator.js	(revision 906)
@@ -1,2 +1,9 @@
+(function($){
+    $.fn.setCursorToTextEnd = function() {
+        $initialVal = this.val();
+        this.val($initialVal + ' ');
+        this.val($initialVal);
+    };
+})(jQuery);
 $(document).on('change', '.upload', function() {
 		var path = this.value;
@@ -22,8 +29,10 @@
 			cache: false,
 			success: function(data){
+				console.log(data)
 				$("#charging").css('display', 'none');
 				$("#result").html(data);
 			},
 			error: function(data){
+				console.log(data);
 			}
 		});
@@ -32,4 +41,33 @@
 	
 });
+
+function updateInfo() {
+    $.ajax({
+        url: '/collaborator/collaborator/updateCollaborator/',
+        type: 'POST',
+        data: $("#frm-update-info").serialize(),
+        success: function (data, textStatus, jqXHR)
+        {
+            result = jQuery.parseJSON(data);
+            if (result.success == "1")
+            {
+				$("#updateInfoSuccess").modal('show');
+				$("#close").click(function(){
+					window.location.reload(true);
+				});
+                
+            }
+            else
+            {
+				//console.log(result.errors);
+                for (var key in result.errors)
+                {
+					console.log(result.errors[key]['field']);
+                    $('#' + result.errors[key]['field']).html(result.errors[key]['content']);
+                }
+            }
+        }
+    });
+}
 
 function changePassword(collaborator_id)
Index: pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 884)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 906)
@@ -5,8 +5,15 @@
         $('#alert-services').modal('show');
     }
+	$('#alert-services').on('hidden.bs.modal', function () {
+		if (update_user_info == "1")
+		{
+			$('#update_user_info').modal({backdrop: 'static',keyboard: false,});
+		}
+	});
 }
 
 if (p_period == -1 && is_overdate == 1)
 {
+	
 	$('#alert-trial-services').modal('show');
 	$('#alert-trial-services').on('hidden.bs.modal', function () {
@@ -17,9 +24,12 @@
 	});
 }
+
 else
 {
-	if (update_user_info == "1")
-	{
-		$('#update_user_info').modal({backdrop: 'static'});
+	if (licenseAvailable == "OK"){
+		if (update_user_info == "1")
+		{
+			$('#update_user_info').modal({backdrop: 'static'});
+		}
 	}
 }
@@ -194,40 +204,44 @@
 
 });
-
-if ($("#form-field-province").val() !== 'undefined'){
-	provinceId = $("#form-field-province").val();
-	$.ajax({
-        url: 'user/getDistrict/' + provinceId,
-        type: 'POST',
-        success: function (data, textStatus, jqXHR)
-        {
-            result = jQuery.parseJSON(data);
-			content = "";
-			if (result != null){
-				for (var i in result){			
-					content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+$(document).ready(function(){
+	if ($("#form-field-province").val() !== 'undefined'){
+		provinceId = $("#form-field-province").val();
+		$.ajax({
+			url: 'user/getDistrict/' + provinceId,
+			type: 'POST',
+			success: function (data, textStatus, jqXHR)
+			{
+				result = jQuery.parseJSON(data);
+				content = "<option></option>";
+				if (result != null){
+					for (var i in result){			
+						content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+					}
+					
 				}
 				$("#form-field-district").html(content);
 			}
-        }
-    });
-}
-
-$("#form-field-province").change(function(){
-	provinceId = this.value;
-	$.ajax({
-        url: 'user/getDistrict/' + provinceId,
-        type: 'POST',
-        success: function (data, textStatus, jqXHR)
-        {
-            result = jQuery.parseJSON(data);
-			content = "";
-			if (result != null){
-				for (var i in result){			
-					content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+		});
+	}
+
+	$("#form-field-province").change(function(){
+		provinceId = this.value;
+		$.ajax({
+			url: 'user/getDistrict/' + provinceId,
+			type: 'POST',
+			success: function (data, textStatus, jqXHR)
+			{
+				console.log(data);
+				result = jQuery.parseJSON(data);
+				content = "<option></option>";
+				if (result != null){
+					for (var i in result){			
+						content = content + '<option value="' + result[i].district_id + '">' + result[i].district_name + '</option>'
+					}
+					
 				}
 				$("#form-field-district").html(content);
 			}
-        }
-    });
-});
+		});
+	});
+});
Index: pro-violet-viettel/sourcecode/assets/js/frontend/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 884)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 906)
@@ -302,6 +302,7 @@
 					}
 				}
-				$(".form-field-district").html(content);
-			}
+				
+			}
+			$(".form-field-district").html(content);
         }
     });
@@ -317,11 +318,12 @@
         {
             result = jQuery.parseJSON(data);
-			content = "";
+			content = "<option></option>";
 			if (result != null){
 				for (var i in result){			
 					content = content + '<option value="' + result[i].district_id + '">'+ result[i].type + " "  + result[i].district_name + '</option>'
 				}
-				$(".form-field-district").html(content);
-			}
+				
+			}
+			$(".form-field-district").html(content);
         }
     });
