Template:Optin/ConfirmNo: Difference between revisions

From Donate
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">πŸ˜” Are you sure? We don't email often. You can change your mind anytime.</div>
<div class="optin-no-prompt__no"></div>
<div class="optin-no-prompt__yes">😍 Thanks for changing your mind! <br>We'll respect your inbox.</div>
<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