|
99 | 99 | print dol_get_fiche_head($head, 'qrcode', $title, -1, $moduleNameLowerCase . '_color@' . $moduleNameLowerCase);
|
100 | 100 | $QRCodes = $saturneQRCode->fetchAll();
|
101 | 101 |
|
| 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 | + |
102 | 118 | print '<table class="noborder centpercent">';
|
103 | 119 | print '<tr class="liste_titre">';
|
104 | 120 | print '<td>' . $langs->trans('URL') . '</td>';
|
|
114 | 130 | print '<input type="hidden" name="action" value="remove">';
|
115 | 131 | print '<tr class="oddeven"><td>';
|
116 | 132 | 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>'; |
119 | 139 | print '</td><td class="center">';
|
120 | 140 | print ucfirst($QRCode->module_name);
|
121 | 141 | print '</td><td class="center">';
|
|
0 commit comments