1/** 2 * Email Reminder Frontend Scripts 3 */ 4(function($) { 5 'use strict'; 6 7 $(document).ready(function() { 8 // Reminder subscription form 9 $('.mep-er-subscription-form').on('submit', function(e) { 10 e.preventDefault(); 11 12 const form = $(this); 13 const email = form.find('.mep-er-email-input').val(); 14 const eventId = form.data('event-id'); 15 const submitButton = form.find('.mep-er-subscription-button'); 16 const statusContainer = form.find('.mep-er-subscription-status'); 17 18 if (!email) { 19 statusContainer.html('<div class="mep-er-error-message">Please enter your email address.</div>'); 20 return; 21 } 22 23 const data = { 24 action: 'mep_er_subscribe_to_reminder', 25 email: email, 26 event_id: eventId, 27 security: mep_er_params.nonce 28 }; 29 30 // Show loading indicator 31 submitButton.prop('disabled', true).html('Processing... <span class="mep-er-loading"></span>'); 32 statusContainer.html(''); 33 34 $.post(mep_er_params.ajax_url, data, function(response) { 35 if (response.success) { 36 statusContainer.html('<div class="mep-er-success-message">' + response.data.message + '</div>'); 37 form.find('.mep-er-email-input').val(''); 38 } else { 39 statusContainer.html('<div class="mep-er-error-message">' + response.data.message + '</div>'); 40 } 41 42 // Reset button 43 submitButton.prop('disabled', false).text('Subscribe'); 44 }).fail(function() { 45 statusContainer.html('<div class="mep-er-error-message">Server error. Please try again later.</div>'); 46 submitButton.prop('disabled', false).text('Subscribe'); 47 }); 48 }); 49 }); 50 51})(jQuery);
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.