PageSourceSearch

https://www.lebanonboro.com/_Assets/js/angular/app/components/contact-form/contact.form.controller.js

js lebanonboro.com collected 2026-10-02 19:19:34 UTC 2,046 bytes, 55 lines download raw bytes

1app.controller('contactFormCtrl', ['$http', '$scope', 'vcRecaptchaService', function ($http, $scope, vcRecaptchaService) {
2    $scope.form = {};
3    $scope.response = null;
4    $scope.widgetId = null;
5    $scope.showMessage = false;
6
7    $http.get('/api/data/GetContactEmails').then(function (response) {
8        $scope.forwardContacts = response.data;
9    });
10
11    $scope.setResponse = function (response) {
12        //console.info('Response available');
13        $scope.response = response;
14    };
15
16    $scope.setWidgetId = function (widgetId) {
17        //console.info('Created widget ID: %s', widgetId);
18        $scope.widgetId = widgetId;
19    };
20
21    $scope.cbExpiration = function () {
22        //console.info('Captcha expired. Resetting response object');
23        vcRecaptchaService.reload($scope.widgetId);
24        $scope.response = null;
25    };
26
27    $scope.processForm = function () {
28        if (vcRecaptchaService.getResponse() === '') {
29            $scope.message = 'Please resolve the captcha and submit!';
30        } else {
31            var post_data = {
32                Name: $scope.form.name,
33                Address: $scope.form.address,
34                Phone: $scope.form.phone,
35                Email: $scope.form.email,
36                Forward: $scope.form.forwards,
37                Message: $scope.form.message,
38                RecaptchaResponse: vcRecaptchaService.getResponse()
39            };
40
41            $http.post('/ContactUs/Contact/', post_data).then(function (response) {
42                if (response.data.error == 0) {
43                    $scope.showMessage = true;
44                    $scope.message = response.data.message;
45                    $scope.form = {};
46                    vcRecaptchaService.reload($scope.widgetId);
47                } else {
48                    $scope.message = 'User verification failed';
49                }
50            }, function (response) {
51                $scope.message = response.data.message;
52            });
53        }
54    };
55}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.