1jQuery(document).on('gform_post_render', function(event, form_id){ 2 3 jQuery('.gf_nfprivacy_hidden').each( function(){ 4 if (jQuery(this).hasClass('gfield_error')) { 5 jQuery(this).removeClass('gf_nfprivacy_hidden'); 6 } 7 }); 8 9 var _form_id = form_id; 10 11 jQuery('body').on('input', '.ginput_container_email input', function(){ 12 13 jQuery('.gf_nfprivacy_hidden input[type="checkbox"]').prop('checked', false); 14 jQuery('.gf_nfprivacy_hidden').removeClass('gf_nfprivacy_hidden'); 15 16 if (jQuery('input[name="email-changed"]', jQuery(this).closest('form')).length == 0) { 17 jQuery(this).closest('form').append('<input type="hidden" name="nfprivacy-email-changed" value="1"/>'); 18 } 19 }); 20 21 // Add support for the 'Gravity Forms: Multiple Form Instances' plugin 22 jQuery( '.gform_wrapper > form ').each( function(){ 23 24 var _formId = jQuery(this).attr('id'); 25 26 if (typeof(_formId) == 'undefined') { 27 return; 28 } 29 30 var _baseId = _formId.replace( 'gform_', '' ); 31 32 jQuery('.nfprivacy_limitedsubmit_value', jQuery(this)).each( function(){ 33 var _fieldId = jQuery(this).attr('id'); 34 var _fieldIdParts = _fieldId.split('_'); 35 var _newId = _fieldIdParts[0] + '_' + _baseId + '_' + _fieldIdParts[2]; 36 jQuery(this).attr('id', _newId); 37 }); 38 39 jQuery('.nfprivacy_iseu_value', jQuery(this)).each( function(){ 40 var _fieldId = jQuery(this).attr('id'); 41 var _fieldIdParts = _fieldId.split('_'); 42 var _newId = _fieldIdParts[0] + '_' + _baseId + '_' + _fieldIdParts[2]; 43 jQuery(this).attr('id', _newId); 44 jQuery(this).trigger('change'); 45 }); 46 47 }); 48}); 49 50jQuery(document).on('gform_post_conditional_logic', function (e, formId) { 51 52 jQuery('#gform_' + formId + ' .nfprivacy_limitedsubmit').each( function(){ 53 54 if (jQuery(this).hasClass('nfprivacy_limitedsubmit_wrapper')) { 55 return; 56 } 57 58 _$parentContainer = jQuery(this).closest('.nfprivacy_limitedsubmit_wrapper'); 59 60 if(_$parentContainer.css('display') !== 'none') { 61 62 if (jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).val() == 1) { 63 return; 64 } 65 66 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).val('1'); 67 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).attr('value', '1'); 68 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).trigger('change'); 69 70 _$parentContainer.closest('form').addClass('nfprivacy-limitedsubmit-active'); 71 } 72 73 else { 74 if (jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).val() == '') { 75 return; 76 } 77 78 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).val(''); 79 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).attr('value', ''); 80 jQuery('.nfprivacy_limitedsubmit_value', _$parentContainer).trigger('change'); 81 82 _$parentContainer.closest('form').removeClass('nfprivacy-limitedsubmit-active'); 83 } 84 85 }); 86 87 jQuery('#gform_' + formId + ' .nfprivacy_iseu').each( function(){ 88 89 if (jQuery(this).hasClass('nfprivacy_iseu_wrapper')) { 90 return; 91 } 92 93 _$parentContainer = jQuery(this).closest('.nfprivacy_iseu_wrapper'); 94 95 if(_$parentContainer.css('display') !== 'none') { 96 97 if (jQuery('.nfprivacy_iseu_value', _$parentContainer).val() == 1) { 98 return; 99 } 100 101 jQuery('.nfprivacy_iseu_value', _$parentContainer).val('1'); 102 jQuery('.nfprivacy_iseu_value', _$parentContainer).attr('value', '1'); 103 jQuery('.nfprivacy_iseu_value', _$parentContainer).trigger('change'); 104 } 105 106 else { 107 if (jQuery('.nfprivacy_iseu_value', _$parentContainer).val() == '') { 108 return; 109 } 110 111 jQuery('.nfprivacy_iseu_value', _$parentContainer).val(''); 112 jQuery('.nfprivacy_iseu_value', _$parentContainer).attr('value', ''); 113 jQuery('.nfprivacy_iseu_value', _$parentContainer).trigger('change'); 114 } 115 116 }); 117 118}); 119 120jQuery( document ).on( 'change', 'input.nfprivacy_iseu_value', function( event ) { 121 gf_raw_input_change( event, this ); 122}); 123 124jQuery( document ).on( 'change', 'input.nfprivacy_limitedsubmit_value', function( event ) { 125 gf_raw_input_change( event, this ); 126}); 127 128jQuery( document ).on( 'click', 'nfprivacy-field-checkbox-label', function( event ) { 129 event.preventDefault() 130 event.stopPropagation(); 131 132 _$checkbox = jQuery(this).sibling('input[type="checkbox"]' ); 133 134 if (_$checkbox.length) { 135 _$checkbox.trigger('click'); 136 } 137});
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.