diff --git a/uc_order/uc_order-invoice-page.tpl.php b/uc_order/uc_order-invoice-page.tpl.php
index 982cbec..302b033 100644
--- a/uc_order/uc_order-invoice-page.tpl.php
+++ b/uc_order/uc_order-invoice-page.tpl.php
@@ -17,7 +17,9 @@
+
+
diff --git a/uc_order/uc_order.module b/uc_order/uc_order.module
index 46a8fc6..ce66fe7 100644
--- a/uc_order/uc_order.module
+++ b/uc_order/uc_order.module
@@ -201,7 +201,7 @@ function uc_order_menu() {
'title' => 'Print invoice',
'description' => 'Print order invoice.',
'page callback' => 'uc_order_view_invoice',
- 'page arguments' => array(3, TRUE),
+ 'page arguments' => array(3, TRUE, TRUE),
'access callback' => 'uc_order_can_view_order',
'access arguments' => array(1, 3),
);
@@ -356,7 +356,10 @@ function uc_order_theme($existing, $type, $theme, $path) {
),
),
'uc_order_invoice_page' => array(
- 'variables' => array('content' => NULL),
+ 'variables' => array(
+ 'content' => NULL,
+ 'closeable' => FALSE,
+ ),
'template' => 'uc_order-invoice-page',
),
'uc_order_state_table' => array(
@@ -1149,7 +1152,7 @@ function uc_order_view($order, $view_mode = 'full') {
/**
* Displays an order invoice.
*/
-function uc_order_view_invoice($order, $print = FALSE) {
+function uc_order_view_invoice($order, $print = FALSE, $closeable = FALSE) {
$build = array(
'#theme' => 'uc_order',
'#order' => $order,
@@ -1159,7 +1162,10 @@ function uc_order_view_invoice($order, $print = FALSE) {
if ($print) {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
- print theme('uc_order_invoice_page', array('content' => drupal_render($build)));
+ print theme('uc_order_invoice_page', array(
+ 'content' => drupal_render($build),
+ 'closeable' => $closeable,
+ ));
exit();
}