Skip to content

Commit

Permalink
Update qrcodev2.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rocket13011 authored Oct 12, 2023
1 parent 273b6db commit aeea81b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions desktop/modal/qrcodev2.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@
<select style="width:250px;" class="eqLogicAttr configuration form-control" id="selectUserqrCodeV2" onInput="userSelectqrCodev2()">
<option value="" disabled selected>{{Aucun}}</option>
<?php
$hidden_user = array('jeedom_support', 'internal_report');
foreach (user::all() as $user) {
$userArray = utils::o2a($user);
log::add('mobile', 'debug', 'USERARRAY '.json_encode($userArray));
if ($userArray['enable'] == 1) {
if($userArray['profils'] == 'admin')
echo '<option value="' . $user->getId() . '">' . ucfirst($user->getLogin()) . '</option>';
}
if (in_array($user->getLogin(), $hidden_user) || $user->getEnable() != 1) continue;
echo '<option value="' . $user->getId() . '">' . ucfirst($user->getLogin()) . '</option>';
}
?>
</select>
Expand All @@ -57,6 +54,18 @@
</div>

<script>


var selectQrCode = document.getElementById('selectUserqrCodeV2');

selectQrCode.addEventListener('change', function() {
console.log('jechange')
userSelectqrCodev2();
});




function userSelectqrCodev2() {
document.getElementById('qrCodecontainer').style.display = "none";
let chooseUser = document.getElementById('selectUserqrCodeV2').value;
Expand Down

0 comments on commit aeea81b

Please sign in to comment.