a
This commit is contained in:
parent
4febb4bf8b
commit
0ee345ef44
|
|
@ -99,7 +99,7 @@ class ControleurRechercheparcarte extends Controleur {
|
|||
|
||||
if (count($parts) !== 5 || $versionTagCarte !== $versionTagCarteEncours || $codeEntite != $_SESSION['p_codeSociete']) {
|
||||
// if ($versionTagCarte !== $versionTagCarteEncours || $codeEntite != $_SESSION['p_codeSociete']) {
|
||||
$msgErreur = 'KANE 01 Carte invalide / Invalid card';
|
||||
$msgErreur = 'Carte invalide / Invalid card';
|
||||
}
|
||||
else{
|
||||
$numeroBeneficiaireCarte = base64_decode($parts[2]);
|
||||
|
|
@ -120,7 +120,7 @@ class ControleurRechercheparcarte extends Controleur {
|
|||
|
||||
if($codeEntite<=" " || $numeroBeneficiaireCarte<=" " || $tagUuid<=" ")
|
||||
{
|
||||
$msgErreur = 'KANE 02 Carte invalide / Invalid card';
|
||||
$msgErreur = 'Carte invalide / Invalid card';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
$this->titre = "INTER-SANTE - "._("Recherche du patient par carte") ;
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* Masquage du texte */
|
||||
#donneesCarte {
|
||||
color: transparent !important;
|
||||
text-shadow: 0 0 8px rgba(0,0,0,0.5) !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
#donneesCarte::placeholder {
|
||||
color: #6c757d !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Animation lors de la saisie */
|
||||
#donneesCarte.reading {
|
||||
border-color: #4caf50 !important;
|
||||
box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
|
||||
animation: pulse-border 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-border {
|
||||
0%, 100% { border-color: #4caf50; }
|
||||
50% { border-color: #66bb6a; }
|
||||
}
|
||||
|
||||
/* Indicateur visuel simple */
|
||||
.reading-indicator {
|
||||
display: none;
|
||||
text-align: center;
|
||||
color: #4caf50;
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.reading-indicator.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form id="frmrechercheparcarte" name="frmrechercheparcarte" method="post" action="Rechercheparcarte/index/">
|
||||
<INPUT style='font-size:40pt; height: 50px; text-align: center;'
|
||||
class="form-control"
|
||||
TYPE="text"
|
||||
id="donneesCarte"
|
||||
name="donneesCarte"
|
||||
autofocus
|
||||
AUTOCOMPLETE="OFF"
|
||||
placeholder="<?= _("Veuillez scanner la carte NFC!")?>">
|
||||
|
||||
<div class="reading-indicator" id="reading-indicator">
|
||||
<i class="fa fa-check-circle"></i> <?= _("Carte détectée") ?>
|
||||
</div>
|
||||
|
||||
<input id="lancerrechercheparcarte" name="lancerrechercheparcarte" class="sr-only" type="submit" value="<?= _("Rechercher") ?>" >
|
||||
</form>
|
||||
|
||||
<div id ="div_wait_nfc"> </div>
|
||||
|
||||
<?php if (isset($msgErreur) && $msgErreur>" "): ?>
|
||||
<div class="alert alert-danger" style="height:38px; padding:5px; text-align: center;">
|
||||
<H4><?= $msgErreur ?></H4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
const inputField = document.getElementById('donneesCarte');
|
||||
const indicator = document.getElementById('reading-indicator');
|
||||
|
||||
// Protection
|
||||
inputField.addEventListener('contextmenu', e => e.preventDefault());
|
||||
inputField.addEventListener('copy', e => e.preventDefault());
|
||||
inputField.addEventListener('cut', e => e.preventDefault());
|
||||
|
||||
// Feedback visuel pendant la saisie
|
||||
inputField.addEventListener('input', function() {
|
||||
if (this.value.length > 0) {
|
||||
this.classList.add('reading');
|
||||
indicator.classList.add('active');
|
||||
} else {
|
||||
this.classList.remove('reading');
|
||||
indicator.classList.remove('active');
|
||||
}
|
||||
});
|
||||
|
||||
// Votre logique existante
|
||||
inputField.addEventListener('change', function () {
|
||||
// alert(this.value);
|
||||
if (this.value.length > 3) {
|
||||
var div_wait_nfc = $('#div_wait_nfc');
|
||||
div_wait_nfc.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #4caf50;"><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<?php
|
||||
$this->titre = "INTER-SANTE - "._("Recherche du patient par carte") ;
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* Masquage du texte */
|
||||
#donneesCarte {
|
||||
color: transparent !important;
|
||||
text-shadow: 0 0 8px rgba(0,0,0,0.5) !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
#donneesCarte::placeholder {
|
||||
color: #6c757d !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Animation lors de la saisie */
|
||||
#donneesCarte.reading {
|
||||
border-color: #4caf50 !important;
|
||||
box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
|
||||
animation: pulse-border 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-border {
|
||||
0%, 100% { border-color: #4caf50; }
|
||||
50% { border-color: #66bb6a; }
|
||||
}
|
||||
|
||||
/* Indicateur visuel simple */
|
||||
.reading-indicator {
|
||||
display: none;
|
||||
text-align: center;
|
||||
color: #4caf50;
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.reading-indicator.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form id="frmrechercheparcarte" name="frmrechercheparcarte" method="post" action="Rechercheparcarte/index/">
|
||||
<INPUT style='font-size:40pt; height: 50px; text-align: center;'
|
||||
class="form-control"
|
||||
TYPE="text"
|
||||
id="donneesCarte"
|
||||
name="donneesCarte"
|
||||
autofocus
|
||||
AUTOCOMPLETE="OFF"
|
||||
placeholder="<?= _("Veuillez scanner la carte NFC ou le QR code!")?>">
|
||||
|
||||
<div class="reading-indicator" id="reading-indicator">
|
||||
<i class="fa fa-check-circle"></i> <span id="indicator-text"><?= _("Carte détectée") ?></span>
|
||||
</div>
|
||||
|
||||
<input id="lancerrechercheparcarte" name="lancerrechercheparcarte" class="sr-only" type="submit" value="<?= _("Rechercher") ?>" >
|
||||
</form>
|
||||
|
||||
<div id="div_wait_nfc"></div>
|
||||
|
||||
<?php if (isset($msgErreur) && $msgErreur>" "): ?>
|
||||
<div class="alert alert-danger" style="height:38px; padding:5px; text-align: center;">
|
||||
<H4><?= $msgErreur ?></H4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
const inputField = document.getElementById('donneesCarte');
|
||||
const indicator = document.getElementById('reading-indicator');
|
||||
const indicatorText = document.getElementById('indicator-text');
|
||||
|
||||
// Protection
|
||||
inputField.addEventListener('contextmenu', e => e.preventDefault());
|
||||
inputField.addEventListener('copy', e => e.preventDefault());
|
||||
inputField.addEventListener('cut', e => e.preventDefault());
|
||||
|
||||
// Détection du type de scan
|
||||
function detectScanType(value) {
|
||||
if (value.endsWith('qr') {
|
||||
return 'qr';
|
||||
}
|
||||
return 'nfc';
|
||||
}
|
||||
|
||||
// Feedback visuel pendant la saisie
|
||||
inputField.addEventListener('input', function() {
|
||||
if (this.value.length > 0) {
|
||||
this.classList.add('reading');
|
||||
indicator.classList.add('active');
|
||||
|
||||
// Mise à jour du texte selon le type détecté
|
||||
const type = detectScanType(this.value);
|
||||
if (type === 'qr') {
|
||||
indicatorText.textContent = '<?= _("QR code détecté") ?>';
|
||||
} else {
|
||||
indicatorText.textContent = '<?= _("Carte détectée") ?>';
|
||||
}
|
||||
} else {
|
||||
this.classList.remove('reading');
|
||||
indicator.classList.remove('active');
|
||||
}
|
||||
});
|
||||
|
||||
// Soumission automatique du formulaire
|
||||
inputField.addEventListener('change', function () {
|
||||
alert(this.value);
|
||||
retur;
|
||||
if (this.value.length > 3) {
|
||||
const type = detectScanType(this.value);
|
||||
const message = type === 'qr'
|
||||
? '<?= _("Traitement du QR code...") ?>'
|
||||
: '<?= _("Lecture de la carte...") ?>';
|
||||
|
||||
var div_wait_nfc = $('#div_wait_nfc');
|
||||
div_wait_nfc.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #4caf50;"><span><i class="fa fa-spinner fa-spin fa-5x"></i></span><p style="margin-top:20px;">' + message + '</p></div>');
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
|
||||
// Focus automatique sur le champ (utile après rafraîchissement)
|
||||
window.addEventListener('load', function() {
|
||||
inputField.focus();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
$this->titre = "INTER-SANTE - "._("Recherche du patient par carte") ;
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* Masquage du texte */
|
||||
#donneesCarte {
|
||||
color: transparent !important;
|
||||
text-shadow: 0 0 8px rgba(0,0,0,0.5) !important;
|
||||
user-select: none !important;
|
||||
}
|
||||
|
||||
#donneesCarte::placeholder {
|
||||
color: #6c757d !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Animation lors de la saisie */
|
||||
#donneesCarte.reading {
|
||||
border-color: #4caf50 !important;
|
||||
box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
|
||||
animation: pulse-border 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-border {
|
||||
0%, 100% { border-color: #4caf50; }
|
||||
50% { border-color: #66bb6a; }
|
||||
}
|
||||
|
||||
/* Indicateur visuel simple */
|
||||
.reading-indicator {
|
||||
display: none;
|
||||
text-align: center;
|
||||
color: #4caf50;
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.reading-indicator.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form id="frmrechercheparcarte" name="frmrechercheparcarte" method="post" action="Rechercheparcarte/index/">
|
||||
<INPUT style='font-size:40pt; height: 50px; text-align: center;'
|
||||
class="form-control"
|
||||
TYPE="text"
|
||||
id="donneesCarte"
|
||||
name="donneesCarte"
|
||||
autofocus
|
||||
AUTOCOMPLETE="OFF"
|
||||
placeholder="<?= _("Veuillez scanner la carte NFC!")?>">
|
||||
|
||||
<div class="reading-indicator" id="reading-indicator">
|
||||
<i class="fa fa-check-circle"></i> <?= _("Carte détectée") ?>
|
||||
</div>
|
||||
|
||||
<input id="lancerrechercheparcarte" name="lancerrechercheparcarte" class="sr-only" type="submit" value="<?= _("Rechercher") ?>" >
|
||||
</form>
|
||||
|
||||
<div id ="div_wait_nfc"> </div>
|
||||
|
||||
<?php if (isset($msgErreur) && $msgErreur>" "): ?>
|
||||
<div class="alert alert-danger" style="height:38px; padding:5px; text-align: center;">
|
||||
<H4><?= $msgErreur ?></H4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
const inputField = document.getElementById('donneesCarte');
|
||||
const indicator = document.getElementById('reading-indicator');
|
||||
|
||||
// Protection
|
||||
inputField.addEventListener('contextmenu', e => e.preventDefault());
|
||||
inputField.addEventListener('copy', e => e.preventDefault());
|
||||
inputField.addEventListener('cut', e => e.preventDefault());
|
||||
|
||||
// Feedback visuel pendant la saisie
|
||||
inputField.addEventListener('input', function() {
|
||||
if (this.value.length > 0) {
|
||||
this.classList.add('reading');
|
||||
indicator.classList.add('active');
|
||||
} else {
|
||||
this.classList.remove('reading');
|
||||
indicator.classList.remove('active');
|
||||
}
|
||||
});
|
||||
|
||||
// Votre logique existante
|
||||
inputField.addEventListener('change', function () {
|
||||
// alert(this.value);
|
||||
if (this.value.length > 3) {
|
||||
var div_wait_nfc = $('#div_wait_nfc');
|
||||
div_wait_nfc.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #4caf50;"><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
this.form.submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user