a
This commit is contained in:
parent
a8cd87fda3
commit
d6b3ecdab8
|
|
@ -46,6 +46,49 @@
|
||||||
|
|
||||||
<legend ><?= _("Informations sur le Bénéficiaire") .$strVip." : (" . $beneficiaire['numeroBeneficiaire'] . ") => " . _("Date Effet") . " : " . dateLang($this->nettoyer($beneficiaire['dateEffetBeneficiaire'])) ?></legend>
|
<legend ><?= _("Informations sur le Bénéficiaire") .$strVip." : (" . $beneficiaire['numeroBeneficiaire'] . ") => " . _("Date Effet") . " : " . dateLang($this->nettoyer($beneficiaire['dateEffetBeneficiaire'])) ?></legend>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- champ pour copier le tag NFC -->
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text"
|
||||||
|
id="tagCarteNfc"
|
||||||
|
value="<?= htmlspecialchars($beneficiaire['tagCarteNfc']) ?>"
|
||||||
|
readonly
|
||||||
|
class="form-control">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-secondary"
|
||||||
|
onclick="copierTag()"
|
||||||
|
title="Copier le tag NFC">
|
||||||
|
<i class="fas fa-copy"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function copierTag() {
|
||||||
|
const valeur = document.getElementById('tagCarteNfc').value;
|
||||||
|
|
||||||
|
navigator.clipboard.writeText(valeur).then(() => {
|
||||||
|
// Feedback visuel
|
||||||
|
const btn = event.currentTarget;
|
||||||
|
const iconeOriginale = btn.innerHTML;
|
||||||
|
btn.innerHTML = '<i class="fas fa-check"></i>';
|
||||||
|
btn.classList.replace('btn-secondary', 'btn-success');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
btn.innerHTML = iconeOriginale;
|
||||||
|
btn.classList.replace('btn-success', 'btn-secondary');
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
}).catch(() => {
|
||||||
|
// Fallback pour anciens navigateurs
|
||||||
|
const input = document.getElementById('tagCarteNfc');
|
||||||
|
input.select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
alert('Tag copié !');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<button class="sr-only" id="btn_pop_save_face" name="btn_pop_save_face" type="button" data-bs-toggle="modal" data-bs-target="#pop_rec_faciale" > </button>
|
<button class="sr-only" id="btn_pop_save_face" name="btn_pop_save_face" type="button" data-bs-toggle="modal" data-bs-target="#pop_rec_faciale" > </button>
|
||||||
|
|
||||||
<div id="div_urlFace">
|
<div id="div_urlFace">
|
||||||
|
|
@ -412,44 +455,3 @@
|
||||||
<?php if($faceActif=='1') : ?>
|
<?php if($faceActif=='1') : ?>
|
||||||
<?php include 'faceebene/ebenetraitementimage.php'; ?>
|
<?php include 'faceebene/ebenetraitementimage.php'; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- champ pour copier le tag NFC -->
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text"
|
|
||||||
id="tagCarteNfc"
|
|
||||||
value="<?= htmlspecialchars($beneficiaire['tagCarteNfc']) ?>"
|
|
||||||
readonly
|
|
||||||
class="form-control">
|
|
||||||
<button type="button"
|
|
||||||
class="btn btn-secondary"
|
|
||||||
onclick="copierTag()"
|
|
||||||
title="Copier le tag NFC">
|
|
||||||
<i class="fas fa-copy"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function copierTag() {
|
|
||||||
const valeur = document.getElementById('tagCarteNfc').value;
|
|
||||||
|
|
||||||
navigator.clipboard.writeText(valeur).then(() => {
|
|
||||||
// Feedback visuel
|
|
||||||
const btn = event.currentTarget;
|
|
||||||
const iconeOriginale = btn.innerHTML;
|
|
||||||
btn.innerHTML = '<i class="fas fa-check"></i>';
|
|
||||||
btn.classList.replace('btn-secondary', 'btn-success');
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
btn.innerHTML = iconeOriginale;
|
|
||||||
btn.classList.replace('btn-success', 'btn-secondary');
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
}).catch(() => {
|
|
||||||
// Fallback pour anciens navigateurs
|
|
||||||
const input = document.getElementById('tagCarteNfc');
|
|
||||||
input.select();
|
|
||||||
document.execCommand('copy');
|
|
||||||
alert('Tag copié !');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user