Skip to content

Commit 18a6991

Browse files
committed
#1045 [QRCode] fix: show qrcode picto on qrcode list
1 parent 1440d1d commit 18a6991

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

admin/qrcode.php

+22-2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,22 @@
9999
print dol_get_fiche_head($head, 'qrcode', $title, -1, $moduleNameLowerCase . '_color@' . $moduleNameLowerCase);
100100
$QRCodes = $saturneQRCode->fetchAll();
101101

102+
print '<div id="pdfModal" class="wpeo-modal">
103+
<div class="modal-container">
104+
<div class="modal-header">
105+
<h2>QR Code</h2>
106+
</div>
107+
<div class="modal-content" style="display: flex; justify-content: center">
108+
<div id="pdfPreview">
109+
<!-- Le PDF sera affiché ici dans un iframe -->
110+
</div>
111+
</div>
112+
<div class="modal-footer">
113+
<button id="downloadBtn" style="margin-top: 10px;"><i class="fas fa-download fa-2x"></i></button>
114+
</div>
115+
</div>
116+
</div>';
117+
102118
print '<table class="noborder centpercent">';
103119
print '<tr class="liste_titre">';
104120
print '<td>' . $langs->trans('URL') . '</td>';
@@ -114,8 +130,12 @@
114130
print '<input type="hidden" name="action" value="remove">';
115131
print '<tr class="oddeven"><td>';
116132
print $QRCode->url;
117-
print '</td><td class="center">';
118-
print '<img src="' . $QRCode->encoded_qr_code . '" alt="QR Code" width="100" height="100">';
133+
print '</td>';
134+
print '<td class="right preview-qr-code">';
135+
print '<input hidden class="qrcode-base64" value="'. $QRCode->encoded_qr_code .'">';
136+
print img_picto($langs->trans("QRCodeGeneration"), 'fontawesome_fa-qrcode_fas_blue');
137+
print ' ' . $form->textwithpicto('', $langs->trans('QRCodeGenerationTooltip'));
138+
print '</td>';
119139
print '</td><td class="center">';
120140
print ucfirst($QRCode->module_name);
121141
print '</td><td class="center">';

0 commit comments

Comments
 (0)