Skip to content

Commit

Permalink
Evarisk#1045 [QRCode] fix: show qrcode picto on qrcode list
Browse files Browse the repository at this point in the history
  • Loading branch information
theodaviddd committed Aug 6, 2024
1 parent 1440d1d commit 18a6991
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions admin/qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@
print dol_get_fiche_head($head, 'qrcode', $title, -1, $moduleNameLowerCase . '_color@' . $moduleNameLowerCase);
$QRCodes = $saturneQRCode->fetchAll();

print '<div id="pdfModal" class="wpeo-modal">
<div class="modal-container">
<div class="modal-header">
<h2>QR Code</h2>
</div>
<div class="modal-content" style="display: flex; justify-content: center">
<div id="pdfPreview">
<!-- Le PDF sera affiché ici dans un iframe -->
</div>
</div>
<div class="modal-footer">
<button id="downloadBtn" style="margin-top: 10px;"><i class="fas fa-download fa-2x"></i></button>
</div>
</div>
</div>';

print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('URL') . '</td>';
Expand All @@ -114,8 +130,12 @@
print '<input type="hidden" name="action" value="remove">';
print '<tr class="oddeven"><td>';
print $QRCode->url;
print '</td><td class="center">';
print '<img src="' . $QRCode->encoded_qr_code . '" alt="QR Code" width="100" height="100">';
print '</td>';
print '<td class="right preview-qr-code">';
print '<input hidden class="qrcode-base64" value="'. $QRCode->encoded_qr_code .'">';
print img_picto($langs->trans("QRCodeGeneration"), 'fontawesome_fa-qrcode_fas_blue');
print ' ' . $form->textwithpicto('', $langs->trans('QRCodeGenerationTooltip'));
print '</td>';
print '</td><td class="center">';
print ucfirst($QRCode->module_name);
print '</td><td class="center">';
Expand Down

0 comments on commit 18a6991

Please sign in to comment.