MediaWiki:Gadget-PrintSubmission.js: Difference between revisions
From Tsadra Foundation Advanced Contemplative Scholarships
(by SublimeText.Mediawiker) |
(by SublimeText.Mediawiker) |
||
| Line 4: | Line 4: | ||
label: 'Save Application as PDF', | label: 'Save Application as PDF', | ||
flags: 'progressive', | flags: 'progressive', | ||
icon: ' | icon: 'article' | ||
} ); | } ); | ||
Revision as of 12:56, 12 July 2023
$( function () {
var printtoPDFbutton = new OO.ui.ButtonWidget( {
label: 'Save Application as PDF',
flags: 'progressive',
icon: 'article'
} );
var printbutton = new OO.ui.ButtonWidget( {
label: 'Print Your Submitted Application',
flags: 'progressive',
icon: 'printer'
} );
$( '#printSubmission' ).append( printtoPDFbutton.$element ).append( printbutton.$element );
printtoPDFbutton.on( 'click', function (){
var printtopdf = document.getElementById('print-to-pdf');
html2pdf(printtopdf);
});
printbutton.on( 'click', function (){
window.print();
return false;
});
});