optionally scale to the page width when printing, #71301
[freeside.git] / httemplate / elements / header-popup.html
index 1759369..04709ce 100644 (file)
@@ -30,6 +30,9 @@ Example:
     <META HTTP-Equiv="Expires" Content="0"> 
 %   unless ( $no_jquery ) {
       <SCRIPT SRC="<% $fsurl %>elements/jquery.js"></SCRIPT>
+%     if ( $FS::CurrentUser::CurrentUser->option('printtofit') ) {
+      <SCRIPT SRC="<% $fsurl %>elements/printtofit.js"></SCRIPT>
+%     }
 %   }
     <% $head |n %>
   </HEAD>
@@ -56,7 +59,7 @@ if ( ref($_[0]) ) {
   $head           = $opt->{head};
   $nobr           = $opt->{nobr};
   #$nocss          = $opt->{nocss};
-  $no_jquery      = $opt->{no_jquery};
+  $no_jquery      = exists($opt->{no_jquery}) ? $opt->{no_jquery} : 1; #v3 only, 0 on v4+
 } else {
   ($title, $menubar) = ( shift, shift );
   $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.