Template:Optin/ConfirmNo: Difference between revisions
Jump to navigation
Jump to search
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: | Line 16: | ||
<div class="optin-no-prompt"> |
<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__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! |
<div class="optin-no-prompt__yes">π Thanks for changing your mind! We'll respect your inbox.</div> |
||
</div> |
</div> |
||
<div class="optin-smallprint links-in-new-tab"> |
<div class="optin-smallprint links-in-new-tab"> |
||
Line 99: | Line 99: | ||
} |
} |
||
</style> |
</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> |
</html> |
Revision as of 16:37, 11 October 2018