|
|
@@ -1,4 +1,9 @@
|
|
|
<?php
|
|
|
+
|
|
|
+/**
|
|
|
+ * @var Location $location
|
|
|
+ */
|
|
|
+
|
|
|
$tabs = [
|
|
|
["details", "Details"],
|
|
|
];
|
|
|
@@ -12,7 +17,10 @@ $venue_type_count = count($venue_types);
|
|
|
$venue_type_columns = array_chunk($venue_types, ceil($venue_type_count / 2));
|
|
|
|
|
|
$selected_venue_type_ids = [];
|
|
|
-if($location->id) {
|
|
|
+
|
|
|
+$is_edit = !empty($location->id);
|
|
|
+
|
|
|
+if($is_edit) {
|
|
|
$location_venue_types = $location->getVenueTypes();
|
|
|
$selected_venue_type_ids = array_column($location_venue_types, "id");
|
|
|
}
|
|
|
@@ -121,20 +129,30 @@ if($location->id) {
|
|
|
|
|
|
<div class="row mb-1">
|
|
|
<div class="col-sm offset-sm-4">
|
|
|
- <div class="form-check">
|
|
|
- <input class="form-check-input" type="checkbox" name="do_not_test" id="do-not-test" value="1" <?=Form::checked($location->do_not_test)?> />
|
|
|
- <label for="do-not-test">Do Not Test</label>
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="do_not_test" id="do-not-test" value="1" <?=Form::checked($location->do_not_test)?> />
|
|
|
+ <label class="custom-control-label" for="do-not-test">Do Not Test</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="row mb-1">
|
|
|
<div class="col-sm offset-sm-4">
|
|
|
- <div class="form-check">
|
|
|
- <input class="form-check-input" type="checkbox" name="closed" id="closed" value="1" <?=Form::checked($location->closed)?> />
|
|
|
- <label for="closed">Closed</label>
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="closed" id="closed" value="1" <?=Form::checked($location->closed)?> />
|
|
|
+ <label class="custom-control-label" for="closed">Closed</label>
|
|
|
+ </div>
|
|
|
+ <small class="text-muted form-text">If a location is closed, it will be unable to be selected for any new tests.</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row mb-1">
|
|
|
+ <div class="col-sm offset-sm-4">
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="archived" id="archived" value="1" <?=Form::checked($location->archived)?> />
|
|
|
+ <label class="custom-control-label" for="archived">Archived</label>
|
|
|
</div>
|
|
|
- <small class="text-muted form-text">By marking a location as closed, the location will be unable to be selected for any new tests.</small>
|
|
|
+ <small class="text-muted form-text">If a location is archived, it will be unable to be selected for any new tests and will not appear in the Map Overview.</small>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -207,9 +225,9 @@ if($location->id) {
|
|
|
foreach($types as $type) {
|
|
|
$checked = in_array($type->id, $selected_venue_type_ids) ? "checked" : "";
|
|
|
?>
|
|
|
- <div class="form-check">
|
|
|
- <input class="form-check-input" id="venue-type-id-<?=$type->id?>" name="venue_type_ids[]" type="checkbox" value="<?=$type->id?>" <?=$checked?> />
|
|
|
- <label class="form-check-label" for="venue-type-id-<?=$type->id?>"><?=htmlspecialchars($type->name)?></label>
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" id="venue-type-id-<?=$type->id?>" name="venue_type_ids[]" type="checkbox" value="<?=$type->id?>" <?=$checked?> />
|
|
|
+ <label class="custom-control-label" for="venue-type-id-<?=$type->id?>"><?=htmlspecialchars($type->name)?></label>
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
@@ -268,9 +286,9 @@ if($location->id) {
|
|
|
<div class="card">
|
|
|
<img class="card-img-top img-cover" src="/img/blank_4_3.png" alt="Photo" style="background-image: url(/account/locations/6/photos/<?=$photo->id?>)" />
|
|
|
<div class="card-body">
|
|
|
- <div class="form-check">
|
|
|
- <input class="form-check-input" type="checkbox" name="delete_file_ids[]" id="photo-<?=$photo->id?>" value="<?=$photo->id?>" />
|
|
|
- <label class="form-check-label" for="photo-<?=$photo->id?>">Delete</label>
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
+ <input class="custom-control-input" type="checkbox" name="delete_file_ids[]" id="photo-<?=$photo->id?>" value="<?=$photo->id?>" />
|
|
|
+ <label class="custom-control-label" for="photo-<?=$photo->id?>">Delete</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -302,7 +320,7 @@ if($location->id) {
|
|
|
<div class="col-lg">
|
|
|
<div class="row">
|
|
|
<div class="col-sm offset-sm-4">
|
|
|
- <button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>">Submit</button>
|
|
|
+ <button class="btn btn-success" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>">Submit</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|