Template:Optin/Default: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
moved styles to Template:Styles/2016 oojs ui.css |
moved javascript to MediaWiki:DonationForm.js |
||
Line 23: | Line 23: | ||
</div> |
</div> |
||
</fieldset> |
</fieldset> |
||
<script> |
|||
/* Called by Common.js */ |
|||
function initOptin() { |
|||
$('.optin-options').on('change', function(e) { |
|||
$('#error-optin').hide(); |
|||
// Only do all this if we have translated prompts |
|||
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) { |
|||
if ( e.target.id === 'optin-no' ) { |
|||
$('.optin-no-prompt').removeClass('is-positive'); |
|||
if ( !$('.optin-no-prompt').is(':visible') ) { |
|||
$('.optin-no-prompt').slideDown(); |
|||
} |
|||
} else { |
|||
$('.optin-no-prompt').addClass('is-positive'); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
</script> |
|||
</html> |
</html> |
Revision as of 14:30, 4 June 2020