Template:Optin/Default: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
use Template:OptinText for error message translations
change function to only fire if selection actually changes
Line 110: Line 110:
/* Called by Common.js */
/* Called by Common.js */
function initOptin() {
function initOptin() {
$('.optin-options').on('click', function(){
$('.optin-options').on('change', function(e) {
$('#error-optin').hide();
$('#error-optin').hide();


// Only do all this if we have translated prompts
// Only do all this if we have translated prompts
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) {
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) {
if ( $('#optin-no').is(':checked') ) {
if ( e.target.id === 'optin-no' ) {
$('.optin-no-prompt').removeClass('is-positive');
$('.optin-no-prompt').removeClass('is-positive');
if ( !$('.optin-no-prompt').is(':visible') ) {
if ( !$('.optin-no-prompt').is(':visible') ) {

Revision as of 20:21, 28 March 2019

Can we stay in touch?
Sorry to hear that. We don't email often; would you consider changing your mind?
Thanks for changing your mind! We'll respect your inbox.