PageSourceSearch

https://bokforingskompaniet.se/wp-content/plugins/custom-form/js/pdf-form-plugin.js

js bokforingskompaniet.se collected 2026-10-08 05:09:02 UTC 7,612 bytes, 216 lines download raw bytes

1jQuery(document).ready(function ($) {
2    $('#pdf-form').on('submit', function (e) {
3        e.preventDefault();
4        $('#spinner-overlay').show();
5
6        // Initialize the values
7        var TjanstepensionerValue;
8    
9    
10        var jaarsavslutValue;
11        var visomkundcheckboxValue;
12
13
14        // Check if the Tjänstepensioner checkbox is checked
15        if ($('#Tjänstepensioner').prop('checked')) {
16            TjanstepensionerValue = $('#Tjänstepensioner').val()
17        } else {
18            TjanstepensionerValue = '0';
19        }
20
21      
22
23
24        if ($('#ja-arsavslut').prop('checked')) {
25            jaarsavslutValue = $('#ja-arsavslut').val()
26        } else {
27            jaarsavslutValue = '0';
28        }
29
30        if ($('#BokföringsKompanietcheckbox').prop('checked')) {
31            BokföringsKompanietValue = $('#BokföringsKompanietcheckbox').val()
32        } else {
33            BokföringsKompanietValue = '0';
34        }
35        
36        if ($('#visomkundcheckbox').prop('checked')) {
37            visomkundcheckboxValue = $('#visomkundcheckbox').val()
38        } else {
39            visomkundcheckboxValue = '0';
40        }
41        console.log(BokföringsKompanietValue);
42
43        console.log(visomkundcheckboxValue);
44
45
46
47        
48
49
50
51
52
53        var valuecheckboxverifikat = [];
54        var numbercheckboxverifikat = [];
55
56        $('.checkbox-input-Verifikat:checked').each(function () {
57            var valueverifikat = $(this).data('value');
58            var numberverifikat = $(this).data('number');
59
60            valuecheckboxverifikat.push(valueverifikat);
61            numbercheckboxverifikat.push(numberverifikat);
62        });
63   
64
65        var valuecheckboxperiod = [];
66        var numbercheckboxperiod = [];
67
68        $('.checkbox-input-Period:checked').each(function () {
69            var valueperiod = $(this).data('value');
70            var numberperiod = $(this).data('number');
71
72            valuecheckboxperiod.push(valueperiod);
73            numbercheckboxperiod.push(numberperiod);
74        });
75
76
77
78        var valuecheckboxInkomstdeklaration2 = [];
79        var numbercheckboxInkomstdeklaration2 = [];
80
81        $('.Inkomstdeklaration2checkbox:checked').each(function () {
82            var valueInkomstdeklaration2 = $(this).data('value');
83            var numberInkomstdeklaration2 = $(this).data('number');
84
85            valuecheckboxInkomstdeklaration2.push(valueInkomstdeklaration2);
86            numbercheckboxInkomstdeklaration2.push(numberInkomstdeklaration2);
87        });
88
89        var valuecheckboxonestopshop = [];
90        var numbercheckboxonestopshop = [];
91
92        $('.onestopshopcheckboxcheckbox:checked').each(function () {
93            var valueonestopshop = $(this).data('value');
94            var numberonestopshop = $(this).data('number');
95
96            valuecheckboxonestopshop.push(valueonestopshop);
97            numbercheckboxonestopshop.push(numberonestopshop);
98        });
99
100
101        var valuecheckboxPunktskat = [];
102        var numbercheckboxPunktskat = [];
103
104        $('.onestopshopcheckboxcheckbox:checked').each(function () {
105            var valuePunktskat = $(this).data('value');
106            var numberPunktskat = $(this).data('number');
107
108            valuecheckboxPunktskat.push(valuePunktskat);
109            numbercheckboxPunktskat.push(numberPunktskat);
110        });
111
112
113        
114
115
116
117
118        
119        var hiddeninputArbetsgivartotal = 0;
120      
121        var hiddeninputArbetsgivar = $('#hiddeninput-Arbetsgivar').val()
122       if(hiddeninputArbetsgivar > 0){
123        hiddeninputArbetsgivartotal  = hiddeninputArbetsgivar;   
124       }
125         
126
127
128        var formData = $(this).serialize();
129
130        $.ajax({
131            url: pdfFormPluginAjax.ajax_url,
132            type: 'POST',
133            data: {
134                action: 'pdf_form_submit',
135                firstname: $('#firstname').val(),
136                lastname: $('#lastname').val(),
137                email: $('#email').val(),
138                companyname: $('#companyname').val(),
139                organizationnum: $('#organizationnum').val(),
140                phonenumber: $('#phonenumber').val(),
141                employerinput: $('#employerinput').val(),
142                BokföringsKompaniet: BokföringsKompanietValue,
143                visomkundcheckbox: visomkundcheckboxValue,
144                visomkundinput: $('#visomkundinput').val(),
145                
146
147                /* Div 2 */
148                VerifikatnumberInput: $('#VerifikatnumberInput').val(),
149                AnställdanumberInput: $('#AnställdanumberInput').val(),
150                Tjänstepensioner: TjanstepensionerValue, 
151                RegelbundnanumberInput: $('#RegelbundnanumberInput').val(),
152                ProjektbaseradenumberInput: $('#ProjektbaseradenumberInput').val(),
153                UtbetalningarnumberInput: $('#UtbetalningarnumberInput').val(),
154
155                /* Div 3 */
156                valuecheckboxverifikat: valuecheckboxverifikat,
157                numbercheckboxverifikat: numbercheckboxverifikat,
158
159                valuecheckboxperiod: valuecheckboxperiod,
160                numbercheckboxperiod: numbercheckboxperiod,
161                Punktskatcheckbox: numbercheckboxPunktskat,
162                onestopshopcheckbox: numbercheckboxonestopshop,
163            
164                valuecheckboxInkomstdeklaration2: valuecheckboxInkomstdeklaration2,
165                numbercheckboxInkomstdeklaration2: numbercheckboxInkomstdeklaration2,
166                hiddeninputArbetsgivartotal: hiddeninputArbetsgivartotal,
167
168                rotrutnumberInput: $('#rotrutnumberInput').val(),
169                grontekniknumberInput: $('#grontekniknumberInput').val(),
170                
171                /* Div 4 */
172                jaarsavslut: jaarsavslutValue,
173                /* Div 5 */
174                DeklarationnumberInput: $('#DeklarationnumberInput').val(),
175            },
176            success: function (response) {
177                $('#spinner-overlay').hide();
178                nextDiv(8);
179                // Custom content with image, text, and buttons
180                var customContent = `
181               
182                     <div class="div-button">
183                        <a onclick="location.reload();" class="cfcal-next-button">Börja Om</a>
184                        <a onclick="window.location.href='https://outlook.office365.com/book/[email protected]';" class="cfcal-next-button">Boka Möte</a>
185                    </div>`;
186
187                var customContentemail = `
188                  
189                     <div class="div-button">
190                        <a onclick="location.reload();" class="cfcal-next-button">Börja Om</a>
191                        <a onclick="window.location.href='https://outlook.office365.com/book/[email protected]';" class="cfcal-next-button">Boka Möte</a>
192                    </div>`;
193                  
194
195                // Hide the spinner and display the response message along with custom content
196                if (response.success) {
197                    $('#spinner-overlay').hide();
198                  
199
200                    $('#response-message').html(customContent);
201                } else {
202                    $('#spinner-overlay').hide();
203                    
204
205                    $('#response-message').html(customContentemail);
206                }
207
208            },
209            error: function () {
210                $('#spinner-overlay').hide();
211                // Hide the spinner and display an error message with custom content
212                $('#response-message').html('<p>An error occurred. Please try again later.</p>' + customContent);
213            }
214        });
215    });
216});

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.