mirror of
https://github.com/itflow-org/itflow
synced 2026-03-11 08:14:52 +00:00
use client_id as post var name not client
This commit is contained in:
@@ -112,7 +112,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($client_id) { ?>
|
<?php if ($client_id) { ?>
|
||||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<?php }else{ ?>
|
<?php }else{ ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -121,7 +121,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="client" required>
|
<select class="form-control select2" name="client_id" required>
|
||||||
<option value="0">- Client (Optional) -</option>
|
<option value="0">- Client (Optional) -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
<?php if (isset($_GET['client_id'])) { ?>
|
||||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -140,7 +140,7 @@ ob_start();
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control select2" name="client">
|
<select class="form-control select2" name="client_id">
|
||||||
<option value="">- Client (Optional) -</option>
|
<option value="">- Client (Optional) -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -131,42 +131,6 @@ ob_start();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (isset($_GET['client_id'])) { ?>
|
|
||||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Client</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="client">
|
|
||||||
<option value="">- Client (Optional) -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_clients = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at > '$trip_created_at' OR client_archived_at IS NULL ORDER BY client_archived_at ASC, client_name ASC");
|
|
||||||
while ($row = mysqli_fetch_assoc($sql_clients)) {
|
|
||||||
$client_id_select = intval($row['client_id']);
|
|
||||||
$client_name_select = nullable_htmlentities($row['client_name']);
|
|
||||||
$client_archived_at = nullable_htmlentities($row['client_archived_at']);
|
|
||||||
if (empty($client_archived_at)) {
|
|
||||||
$client_archived_display = "";
|
|
||||||
} else {
|
|
||||||
$client_archived_display = "Archived - ";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo "$client_archived_display$client_name_select"; ?></option>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if (isset($_POST['add_trip'])) {
|
|||||||
|
|
||||||
require_once 'trip_model.php';
|
require_once 'trip_model.php';
|
||||||
|
|
||||||
$client_id = intval($_POST['client']);
|
$client_id = intval($_POST['client_id']);
|
||||||
|
|
||||||
if ($client_id) {
|
if ($client_id) {
|
||||||
enforceClientAccess();
|
enforceClientAccess();
|
||||||
|
|||||||
Reference in New Issue
Block a user