mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
Fixed that checkbox was undefined, as dialog was already closed
This commit is contained in:
parent
a31283fbc3
commit
2b3f0978b7
|
|
@ -442,6 +442,7 @@ $(document).on("click", "#print-shopping-list-button", function(e)
|
|||
className: 'btn-secondary',
|
||||
callback: function () {
|
||||
bootbox.hideAll();
|
||||
var printHeader = $("#print-show-header").prop("checked");
|
||||
var thermalPrintDialog = bootbox.dialog({
|
||||
title: __t('Printing'),
|
||||
message: '<p><i class="fa fa-spin fa-spinner"></i> ' + __t('Connecting to printer...') + '</p>'
|
||||
|
|
@ -449,7 +450,7 @@ $(document).on("click", "#print-shopping-list-button", function(e)
|
|||
//Delaying for one second so that the alert can be closed
|
||||
setTimeout(function ()
|
||||
{
|
||||
Grocy.Api.Get('print/shoppinglist/thermal?list=' + $("#selected-shopping-list").val() + '&printHeader=' + $("#print-show-header").prop("checked"),
|
||||
Grocy.Api.Get('print/shoppinglist/thermal?list=' + $("#selected-shopping-list").val() + '&printHeader=' + printHeader,
|
||||
function (result)
|
||||
{
|
||||
bootbox.hideAll();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user