mirror of https://github.com/itflow-org/itflow
Allow Manual Input of Trip Destination or select from client locations, Added Remember me checkbox for future implementation
This commit is contained in:
parent
d2e3c1e12d
commit
3f2f405596
|
|
@ -13,6 +13,12 @@ $('.select2').select2({
|
|||
theme: 'bootstrap4'
|
||||
});
|
||||
|
||||
// Initialize Select2 Elements
|
||||
$('.select2Tag').select2({
|
||||
theme: 'bootstrap4',
|
||||
tags: true
|
||||
});
|
||||
|
||||
// Initialize TinyMCE
|
||||
tinymce.init({
|
||||
selector: '.tinymce',
|
||||
|
|
|
|||
|
|
@ -310,6 +310,12 @@ if (isset($_POST['login'])) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="remember_me">
|
||||
<label class="custom-control-label" for="remember_me">Remember Me</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (isset($token_field)) { echo $token_field; } ?>
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block mb-3" name="login">Sign In</button>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,26 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-arrow-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="destination" placeholder="Enter your destination" required>
|
||||
<select class="form-control select2Tag" name="destination" required>
|
||||
<option value="">- Select or Input Destination Address -</option>
|
||||
<?php
|
||||
|
||||
// WIP Need to only show users within the session company
|
||||
$sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_locations)) {
|
||||
$location_name = nullable_htmlentities($row['location_name']);
|
||||
$location_address = nullable_htmlentities($row['location_address']);
|
||||
$location_city = nullable_htmlentities($row['location_city']);
|
||||
$location_state = nullable_htmlentities($row['location_state']);
|
||||
$location_zip = nullable_htmlentities($row['location_zip']);
|
||||
|
||||
?>
|
||||
<option><?php echo "$location_address $location_city $location_state $location_zip"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -72,8 +91,10 @@
|
|||
<option value="">- Driver -</option>
|
||||
<?php
|
||||
|
||||
// WIP Need to only show users within the session company
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM users ORDER BY user_name ASC");
|
||||
$sql = mysqli_query($mysqli, "SELECT users.user_id, user_name FROM users
|
||||
LEFT JOIN user_settings on users.user_id = user_settings.user_id
|
||||
WHERE user_role > 1 AND user_archived_at IS NULL ORDER BY user_name ASC"
|
||||
);
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,27 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-arrow-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="destination" value="<?php echo $trip_destination; ?>" required>
|
||||
<select class="form-control select2Tag" name="destination" required>
|
||||
<option><?php echo $trip_destination; ?></option>
|
||||
<?php
|
||||
|
||||
// WIP Need to only show users within the session company
|
||||
$sql_locations_select = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_locations_select)) {
|
||||
$location_name = nullable_htmlentities($row['location_name']);
|
||||
$location_address = nullable_htmlentities($row['location_address']);
|
||||
$location_city = nullable_htmlentities($row['location_city']);
|
||||
$location_state = nullable_htmlentities($row['location_state']);
|
||||
$location_zip = nullable_htmlentities($row['location_zip']);
|
||||
$location_full_address = "$location_address $location_city $location_state $location_zip";
|
||||
|
||||
?>
|
||||
<option><?php echo $location_full_address; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue