[{extends "./_base.tpl"}]

[{block name="body"}]
    <table id="qrcode">
        <tr>
            <td>
                <img id="code" src="[{$qrCodeUrl}]" alt="QR-Code" />
            </td>
            <td>
                <div id="description">[{$description}]</div>
            </td>
            <td>
                <img id="logo" src="[{$logoUrl}]" alt="" />
            </td>
        </tr>
    </table>

    <script>
        // We need this timer for the browser to correctly detect the image heights...
        setTimeout(function () {
            // Now we try to set the logo to the same size as the QR Code.
            $('logo').writeAttribute('height', $('code').getHeight() + 'px');

            if (window.print) {
                window.print();
            }
        }, 100);
    </script>
[{/block}]
