| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bsite.hellogtx.com/public/js/ng/ |
Upload File : |
//app.controller("PackageListingController", ["$scope", "$location", "$http", '$filter', 'rvServices', function($scope, $location, $http, $filter, rvServices) {}]);
app.controller("SendQueryController", ["$scope", "$http", function($scope, $http) {
var deafualtForm = {inputName: '', inputEmail: '', inputPhone: '', inputMessage: '',inputDestination:''}
$scope.reset = function(formData) {
$scope.formData = angular.copy(deafualtForm);
};
$scope.resultClass, $scope.resultMessage = '';
$scope.formData;
$scope.submitButtonDisabled = false;
$scope.submitted = false;
$scope.querysent = false;
$scope.sendQuery = function(contactform) {
$scope.submitted = true;
$scope.submitButtonDisabled = true;
$scope.querysent = false;
if (contactform.$valid) {
var gtxpackageid = $('#PkgSysIdHTML').val();
var TravelPlanId = $('#packagetpid_' + gtxpackageid).val();
var cityid = $('#cityid').val();
var planType = $('#planType').val();
var PriceRange = '';
var PKGCheckInDate = '';
var PKGCheckOutDate = '';
var MinPrice = '';
var MaxPrice = '';
$scope.formData.TravelPlanId = TravelPlanId;
$scope.formData.cityid = cityid;
$scope.formData.planType = planType;
$scope.formData.PriceRange = PriceRange;
$scope.formData.PKGCheckInDate = PKGCheckInDate;
$scope.formData.PKGCheckOutDate = PKGCheckOutDate;
$scope.formData.MinPrice = MinPrice;
$scope.formData.MaxPrice = MaxPrice;
$http({method: 'POST', url: conf.SITEURL + 'detail/index/send-query-details', data: $.param($scope.formData), headers: {'Content-Type': 'application/x-www-form-urlencoded'}}).success(function(data) {
if (data.status) {
$scope.submitButtonDisabled = true;
$scope.resultMessage = data.message;
$scope.resultClass = 'bg-success';
$scope.submitButtonDisabled = false;
contactform.$setPristine(true);
$scope.reset(contactform);
$scope.querysent = true;
$scope.submitted = false;
} else {
$scope.submitButtonDisabled = false;
$scope.resultMessage = data.message;
$scope.resultClass = 'bg-danger';
}
});
} else {
$scope.submitButtonDisabled = false;
$scope.resultMessage = 'Please fill out all the fields';
$scope.resultClass = 'bg-danger';
}
}
}]);
app.controller("SendQueryControllerDetails", ["$scope", "$http", function($scope, $http) {
var getName = $('input[name="inputName"]').attr('value');
var getPhone = $('input[name="inputPhone"]').attr('value');
var getEmail = $('input[name="inputEmail"]').attr('value');
var deafualtForm = {inputName: getName, inputEmail: getEmail, inputPhone: getPhone, inputMessage: '', Destination:'', DestinationID:'', planType:''}
$scope.reset = function(formData) {
$scope.formData = angular.copy(deafualtForm);
};
//$scope.inputName = "Hello World!";
$scope.resultClass, $scope.resultMessage = '';
$scope.formData = deafualtForm;
$scope.submitButtonDisabled = false;
$scope.submitted = false;
$scope.querysent = false;
$scope.sendQueryDetails = function(contactform) {
$scope.submitted = true;
$scope.submitButtonDisabled = true;
$scope.querysent = false;
if (contactform.$valid) {
var gtxpackageid = $('#PkgSysIdHTML').val();
var TravelPlanId = $('#packagetpid_' + gtxpackageid).val();
var PriceRange = '';
var PKGCheckInDate = '';
var PKGCheckOutDate = '';
var MinPrice = '';
var MaxPrice = '';
var Destination = $('#Destination').val();
var DestinationID = $('#DestinationID').val();
var planType = $('#planType').val();
$scope.formData.TravelPlanId = TravelPlanId;
$scope.formData.PriceRange = PriceRange;
$scope.formData.PKGCheckInDate = PKGCheckInDate;
$scope.formData.PKGCheckOutDate = PKGCheckOutDate;
$scope.formData.MinPrice = MinPrice;
$scope.formData.MaxPrice = MaxPrice;
$scope.formData.Destination = Destination;
$scope.formData.DestinationID = DestinationID;
$scope.formData.planType = planType;
$http({method: 'POST', url: conf.SITEURL + 'detail/index/send-query-details', data: $.param($scope.formData), headers: {'Content-Type': 'application/x-www-form-urlencoded'}}).success(function(data) {
if (data.status) {
$scope.submitButtonDisabled = true;
$scope.resultMessage = data.message;
$scope.resultClass = 'bg-success';
$scope.submitButtonDisabled = false;
contactform.$setPristine(true);
$scope.reset(contactform);
$scope.querysent = true;
$scope.submitted = false;
} else {
$scope.submitButtonDisabled = false;
$scope.resultMessage = data.message;
$scope.resultClass = 'bg-danger';
}
});
} else {
$scope.submitButtonDisabled = false;
$scope.resultMessage = 'Please fill out all the fields ';
$scope.resultClass = 'bg-danger';
}
}
}]);