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 Β |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
</ul> |
</ul> |
||
<div class="optin-no-prompt"> |
<div class="optin-no-prompt"> |
||
<div class="optin-no-prompt__no"> |
<div class="optin-no-prompt__no"></div> |
||
<div class="optin-no-prompt__yes"> |
<div class="optin-no-prompt__yes"></div> |
||
</div> |
</div> |
||
<div class="optin-smallprint links-in-new-tab"> |
<div class="optin-smallprint links-in-new-tab"> |
||
Line 24: | Line 24: | ||
<style> |
<style> |
||
/* --- Opt-in --- */ |
/* --- Opt-in --- */ |
||
.optin-options ul { |
.optin-options ul { |
||
list-style: none; |
list-style: none; |
||
Line 99: | Line 98: | ||
} |
} |
||
</style> |
</style> |
||
<script> |
|||
/* Called by Common.js */ |
|||
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']; |
|||
// Only do all this if we have translated prompts |
|||
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> |
Latest revision as of 16:48, 11 October 2018