PageSourceSearch

https://www.citizen.co.za/wp-content/themes/citizen-2023/assets/js/sign-in.js?ver=2.1

js citizen.co.za collected 2026-09-24 08:29:25 UTC 1,765 bytes, 57 lines download raw bytes

1jQuery(document).ready(function ($) {
2    let form = $('#frm-sign-in');
3
4    form.on( 'submit', function ( e ) {
5        submit_form(e)
6    });
7
8    function submit_form(e){
9        e.preventDefault();
10        let serialize_data = form.serialize();
11        $.ajax({
12            url: citizen_premium.ajaxurl,
13            type: 'POST',
14            data: {
15                action: 'premium_login',
16                nonce: citizen_premium.nonce,
17                data: serialize_data
18            },
19            success: function(response) {
20                // Handle the successful response
21                if(true === response.data){
22                    window.location.href = citizen_premium.redirect_url;
23                }else{
24                    display_form_notice();
25                }
26            },
27            error: function(xhr, status, error) {
28                // Handle the error
29            },
30            beforeSend: function() {
31                // Show the spinner before the AJAX request starts
32                toggle_ajax_spinner(true);
33            },
34            complete: function() {
35                // Hide the spinner after the AJAX request completes (success or error)
36                toggle_ajax_spinner(false);
37            }            
38        }); 
39    }
40
41    function display_form_notice(){
42        let notice = form.find('.error-notice');
43        notice.show();
44        setTimeout(function() {
45            notice.fadeOut();
46        }, 5000);
47    }
48
49    function toggle_ajax_spinner(display){
50        let spinner = form.find('.ajax-spinner');
51        if(true === display){
52            spinner.css('display', 'inline-block');
53        }else{
54            spinner.hide();
55        }
56    }
57});

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.