Template:Optin/ConfirmNo: Difference between revisions

Content deleted Content added
Created page with "<html> <fieldset class="optin-options"> <span id="error-optin" class="lp-error" style="display: none;"> </html>{{int:donate_interface-error-msg-opt_in}}<html>..."
 
No edit summary
Line 16:
<div class="optin-no-prompt">
<div class="optin-no-prompt__no">😔 Are you sure? We don't email often. You can change your mind anytime.</div>
<div class="optin-no-prompt__yes">😍 Thanks for changing your mind! <br>We'll respect your inbox.</div>
</div>
<div class="optin-smallprint links-in-new-tab">
Line 99:
}
</style>
<script>
function initOptin() {
var language = mw.config.get('wgUserLanguage');
var optinNoPrompts = {
'en' : {
'no' : "😔 Are you sure? We don't email often. You can change your mind anytime.",
'yes' : "😍 Thanks for changing your mind! We'll respect your inbox."
}
};
optinNoPrompts['en-gb'] = optinNoPrompts['en'];
 
if ( optinNoPrompts[language] ) {
$('.optin-no-prompt__no').text( optinNoPrompts[language].no );
$('.optin-no-prompt__yes').text( optinNoPrompts[language].yes );
 
$('.optin-options').on('click', function(){
if ( $('#optin-no').is(':checked') ) {
$('.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>