fix datetimepicker bs

This commit is contained in:
Josh North 2021-06-03 11:04:49 -04:00
parent 335817d4d0
commit c799a005a9
4 changed files with 72 additions and 80 deletions

View File

@ -202,5 +202,5 @@
height: 27px;
line-height: 27px; }
.input-group [data-toggle="datetimepicker"] {
.input-group [data-bs-toggle="datetimepicker"] {
cursor: pointer; }

View File

@ -332,7 +332,7 @@ if (Registry::AUTHMETHOD == 'SAML') {
<input placeholder="<?php echo $transLang['OPTIONAL']; ?>" name="outtime" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-<?php echo $row['visits_id']; ?>" id="datetimepicker-<?php echo $row['visits_id']; ?>" data-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $row['visits_id']; ?>"/>
<script type="text/javascript">
$(function () {
$('.datetimepicker-<?php echo $row['visits_id']; ?>').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss'});
$('.datetimepicker-<?php echo $row['visits_id']; ?>').datetimepicker({'timeZone': '<?php echo $timezone; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
});
</script>
</div>
@ -418,7 +418,7 @@ if (Registry::AUTHMETHOD == 'SAML') {
<input placeholder="<?php echo $transLang['OPTIONAL']; ?>" name="outtime" type="text" class="form-control form-control-sm bg-white datetimepicker-input datetimepicker-<?php echo $visitid; ?>" id="datetimepicker-<?php echo $visitid; ?>" data-toggle="datetimepicker" data-target=".datetimepicker-<?php echo $visitid; ?>" />
<script type="text/javascript">
$(function () {
$('.datetimepicker-<?php echo $visitid; ?>').datetimepicker({'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss'});
$('.datetimepicker-<?php echo $visitid; ?>').datetimepicker({'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
});
</script>
</div>

File diff suppressed because one or more lines are too long

View File

@ -85,22 +85,21 @@
} else { ?>
<!-- CONTENT START -->
<div class="container">
<div class="row">
<div class="col-sm">
<div class="container-fluid">
<div class="row row-cols-1">
<div class="col d-grid gap-2">
<div class="col">
<h2><i class="fas fa-chart-pie"></i> <?php echo $transLang['REPORTS']; ?></h2>
<p class="lead"><?php echo $transLang['REPORTS_DESC']; ?></p>
</div>
</div>
<form action="reports.php" method="post">
<fieldset>
<div class="form-group row">
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-text">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['REPORTS']; ?></span>
</div>
<select name="reporttype" class="form-control">
<form action="reports.php" method="post">
<div class="row row-cols-2">
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['REPORTS']; ?></span>
<select name="reporttype" class="form-control form-control-lg">
<?php if (isset($_POST['reporttype'])): ?>
<option value="<?php echo $_POST['reporttype']; ?>" placeholder="<?php echo $transLang['REPORTS']; ?>"><?php echo $_POST['reporttype']; ?></option>
<?php else: ?>
@ -109,13 +108,11 @@
</select>
</div>
</div>
<div class="col-sm">
<div class="input-group mb-3">
<div class="input-group-text">
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['SITE']; ?>:</span>
</div>
<?php if (isset($_POST['repsite'])) { $currentrepsite = $_POST['repsite']; } else { $currentrepsite = "0"; }; ?>
<select name="repsite" class="form-control">
<select name="repsite" class="form-control form-control-lg">
<?php if($session_user["0"]["users_usertype"] == "ADMIN") { ?>
<option value="all"<?php if ($currentrepsite == "all") {echo " selected";}; ?>><?php echo $transLang['ALL']; ?></option>
<?php } ?>
@ -126,40 +123,35 @@
</div>
</div>
</div>
<div class="form-group row">
<div class='col-sm'>
<div class="input-group date" id="datetimepicker-1" data-target-input="#datetimepicker-1">
<div class="input-group-text " data-target=".datetimepicker-1" data-toggle="datetimepicker">
<div class="input-group-text "><i class="fa fa-calendar"></i>&nbsp <?php echo $transLang['START']; ?></div>
</div>
<input name="starttime" type="text" class="datetimepicker-input form-control datetimepicker-1" id="datetimepicker-1" data-target=".datetimepicker-1" autocomplete="new-password" required />
<div class="row row-cols-2">
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="input-group-text date" id="datetimepicker-1" data-target-input="#datetimepicker-1" data-target=".datetimepicker-1" data-toggle="datetimepicker"><i class="fas fa-calendar"></i>&nbsp <?php echo $transLang['START']; ?></span>
<input name="starttime" type="text" class="datetimepicker-input form-control form-control-lg datetimepicker-1" id="datetimepicker-1" data-target=".datetimepicker-1" autocomplete="new-password" required />
</div>
</div>
<div class='col-sm'>
<div class="input-group date" id="datetimepicker-2" data-target-input="#datetimepicker-2">
<div class="input-group-text" data-target=".datetimepicker-2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i>&nbsp <?php echo $transLang['END']; ?></div>
</div>
<input name="endtime" type="text" class="datetimepicker-input form-control datetimepicker-2" id="datetimepicker-2" data-target=".datetimepicker-2" autocomplete="new-password" required />
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="input-group-text date" id="datetimepicker-2" data-target-input="#datetimepicker-2" data-target=".datetimepicker-2" data-toggle="datetimepicker"><i class="fas fa-calendar"></i>&nbsp <?php echo $transLang['END']; ?></span>
<input name="endtime" type="text" class="datetimepicker-input form-control form-control-lg datetimepicker-2" id="datetimepicker-2" data-target=".datetimepicker-2" autocomplete="new-password" required />
</div>
</div>
<script type="text/javascript">
$(function () {
$('.datetimepicker-1').datetimepicker({defaultDate:'<?php if (isset($_POST['starttime'])) { echo $_POST['starttime']; }; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss'});
$('.datetimepicker-1').datetimepicker({defaultDate:'<?php if (isset($_POST['starttime'])) { echo $_POST['starttime']; }; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
});
</script>
<script type="text/javascript">
$(function () {
$('.datetimepicker-2').datetimepicker({defaultDate:'<?php if (isset($_POST['endtime'])) { echo $_POST['endtime']; }; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss'});
$('.datetimepicker-2').datetimepicker({defaultDate:'<?php if (isset($_POST['endtime'])) { echo $_POST['endtime']; }; ?>', 'sideBySide':true, 'format':'YYYY-MM-DD HH:mm:ss', 'allowInputToggle': true });
});
</script>
</div>
<div class="form-group row">
<div class="col-sm">
<button type="submit" class="form-control btn btn-block btn-primary"><i class="glyphicon glyphicon-play"></i> <?php echo $transLang['SAVE']; ?></button>
<div class="row row-cols-1">
<div class="col d-grid gap-2">
<button type="submit" class="form-control form-control-lg btn btn-lg btn-primary"><i class="fas fa-play"></i> <?php echo $transLang['SAVE']; ?></button>
</div>
</div>
</fieldset>
</form>
</div>
<?php if (isset($_POST['reporttype'])): ?>