|
|
@@ -24,7 +24,7 @@ $tabs = [
|
|
|
?>
|
|
|
</ul>
|
|
|
|
|
|
- <div class="tab-content mb-3" id="tab-content">
|
|
|
+ <div class="tab-content" id="tab-content">
|
|
|
<div class="tab-pane fade show active" id="details" role="tabpanel" aria-labelledby="details-tab">
|
|
|
<div class="row">
|
|
|
<div class="col-lg mb-3 mb-lg-0">
|
|
|
@@ -96,6 +96,16 @@ $tabs = [
|
|
|
<textarea class="form-control" name="opening_hours" id="opening-hours" placeholder="Enter opening hours" rows="4" maxlength="100"><?=htmlspecialchars($location->opening_hours)?></textarea>
|
|
|
</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>
|
|
|
+ <small class="text-muted form-text">By marking a location as closed, they will no longer appear for selection in new Projects.</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="col-lg">
|
|
|
|
|
|
@@ -146,67 +156,84 @@ $tabs = [
|
|
|
</div>
|
|
|
|
|
|
<div class="tab-pane fade" id="photos" role="tabpanel" aria-labelledby="photos-tab">
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="shop-left">Shop Name (Left)</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="shop_left" id="shop-left" placeholder="Enter shop name (left)" value="<?=htmlspecialchars($location->shop_left)?>" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="row mb-1">
|
|
|
- <label class="col-sm-4 col-form-label" for="shop-right">Shop Name (Right)</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control" type="text" name="shop_right" id="shop-right" placeholder="Enter shop name (right)" value="<?=htmlspecialchars($location->shop_right)?>" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- if($location->id) {
|
|
|
- ?>
|
|
|
- <div class="row mb-3">
|
|
|
- <label class="col-sm-4 col-form-label" for="photo">JPEG File</label>
|
|
|
- <div class="col-sm">
|
|
|
- <input class="form-control-file" type="file" name="photo" id="photo" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
- if(!empty($photos)) {
|
|
|
- ?>
|
|
|
- <h3>Manage Photos</h3>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-lg">
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="shop-left">Shop Name (Left)</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="shop_left" id="shop-left" placeholder="Enter shop name (left)" value="<?=htmlspecialchars($location->shop_left)?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row mb-1">
|
|
|
+ <label class="col-sm-4 col-form-label" for="shop-right">Shop Name (Right)</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control" type="text" name="shop_right" id="shop-right" placeholder="Enter shop name (right)" value="<?=htmlspecialchars($location->shop_right)?>" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="row">
|
|
|
+ </div>
|
|
|
+ <div class="col-lg">
|
|
|
<?php
|
|
|
- foreach($photos as $photo) {
|
|
|
+ if($location->id) {
|
|
|
?>
|
|
|
- <div class="col-md-6">
|
|
|
- <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="row mb-3">
|
|
|
+ <label class="col-sm-4 col-form-label" for="photo">JPEG File</label>
|
|
|
+ <div class="col-sm">
|
|
|
+ <input class="form-control-file" type="file" name="photo" id="photo" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ if(!empty($photos)) {
|
|
|
+ ?>
|
|
|
+ <h3>Manage Photos</h3>
|
|
|
+
|
|
|
+ <div class="row">
|
|
|
+ <?php
|
|
|
+ foreach($photos as $photo) {
|
|
|
+ ?>
|
|
|
+ <div class="col-md-6">
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
</div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ?>
|
|
|
+ <div class="alert alert-info">
|
|
|
+ <i class="fal fa-fw fa-info-circle"></i> Adding photos will become available when location is added.
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
?>
|
|
|
</div>
|
|
|
- <?php
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- ?>
|
|
|
- <div class="alert alert-info">
|
|
|
- <i class="fal fa-fw fa-info-circle"></i> Adding photos will become available when location is added.
|
|
|
</div>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
+ <div class="row">
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>">Submit</button>
|
|
|
</form>
|
|
|
</div>
|