Clean up Logic for Client Add and Client Edit Modals, same for trip add copy edit

This commit is contained in:
johnnyq
2023-11-08 13:34:58 -05:00
parent 40b6723fac
commit eb01e4b4d5
6 changed files with 135 additions and 135 deletions

View File

@@ -54,13 +54,32 @@
<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" placeholder="Enter a purpose" name="destination" value="<?php echo $trip_destination; ?>" required>
<select class="form-control select2" name="destination" data-tags="true" data-placeholder="- Select / Input Destination -" required>
<option><?php echo $trip_destination; ?></option>
<?php
$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>
<div class="form-group">
<label>Purpose <strong class="text-danger">*</strong></label>
<textarea rows="4" class="form-control" name="purpose" required><?php echo $trip_purpose; ?></textarea>
<textarea rows="4" class="form-control" placeholder="Enter a purpose" name="purpose" required><?php echo $trip_purpose; ?></textarea>
</div>
<div class="form-group">