siteResource.update(routeArgs, p,  function() {
            $scope.original = angular.copy($scope.site);
            var msg = "Site details updated successfully.";
            console.log(msg); alert(msg);
        }, function() {