i finally committed i guess
Signed-off-by: boris <boris@borishub.co.uk>
This commit is contained in:
163
Views/template/createModal.phtml
Normal file → Executable file
163
Views/template/createModal.phtml
Normal file → Executable file
@@ -1,32 +1,145 @@
|
||||
<button type="button" class="col btn bg-primary btn-outline-primary text-light" data-bs-toggle="modal" data-bs-target="#createModal">
|
||||
<span class="bi bi-pen-fill"></span>
|
||||
</button>
|
||||
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="updateModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="updateModalLabel">Add Facility</h5>
|
||||
<?php if($view->user->getAccessLevel() == 1): ?>
|
||||
<!-- Create Facility Modal -->
|
||||
<div class="modal fade" id="createModal" tabindex="-1" aria-labelledby="createModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content border-0 shadow">
|
||||
<div class="modal-header bg-light">
|
||||
<h5 class="modal-title" id="createModalLabel">
|
||||
<i class="bi bi-plus-circle-fill text-success me-2"></i>Add New Facility
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>">
|
||||
<form class="form-inline" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?> ">
|
||||
<input name="titlCreate" class="form-control rounded mb-2" placeholder="Title">
|
||||
<input name="cateCreate" class="form-control rounded mb-2" placeholder="Category">
|
||||
<input name="descCreate" class="form-control rounded mb-2" placeholder="Description">
|
||||
<input name="hnumCreate" class="form-control rounded mb-2" placeholder="House Number">
|
||||
<input name="strtCreate" class="form-control rounded mb-2" placeholder="Street Name">
|
||||
<input name="cntyCreate" class="form-control rounded mb-2" placeholder="County">
|
||||
<input name="townCreate" class="form-control rounded mb-2" placeholder="Town">
|
||||
<input name="postCreate" class="form-control rounded mb-2" placeholder="Postcode">
|
||||
<input name="contCreate" class="form-control rounded mb-2" placeholder="Contributor">
|
||||
</form>
|
||||
<button type="submit" class="btn bg-primary btn-outline-primary text-light" name="createButton">Add</button>
|
||||
<div class="modal-body p-4">
|
||||
<form id="createForm">
|
||||
<input type="hidden" name="action" value="create">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="titlCreate" class="form-label">Title</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-tag text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="titlCreate" name="titlCreate" placeholder="Enter facility title" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="cateCreate" class="form-label">Category</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-bookmark text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="cateCreate" name="cateCreate" placeholder="Enter facility category" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="descCreate" class="form-label">Description</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-card-text text-success"></i>
|
||||
</span>
|
||||
<textarea class="form-control border-start-0" id="descCreate" name="descCreate" placeholder="Enter facility description" rows="3" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="hnumCreate" class="form-label">House/Building Number</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-house text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="hnumCreate" name="hnumCreate" placeholder="Enter number" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="strtCreate" class="form-label">Street Name</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-signpost text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="strtCreate" name="strtCreate" placeholder="Enter street name" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="townCreate" class="form-label">Town/City</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-building text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="townCreate" name="townCreate" placeholder="Enter town/city" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="cntyCreate" class="form-label">County</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-map text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="cntyCreate" name="cntyCreate" placeholder="Enter county" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="postCreate" class="form-label">Postcode</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-mailbox text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="postCreate" name="postCreate" placeholder="Enter postcode" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="latCreate" class="form-label">Latitude</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-geo-alt text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="latCreate" name="latCreate" placeholder="Enter latitude" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="lngCreate" class="form-label">Longitude</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-geo-alt text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0" id="lngCreate" name="lngCreate" placeholder="Enter longitude" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="contCreate" class="form-label">Contributor</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<i class="bi bi-person text-success"></i>
|
||||
</span>
|
||||
<input type="text" class="form-control border-start-0 bg-light" id="contCreate" name="contCreate" placeholder="Auto-filled with your username" disabled required>
|
||||
</div>
|
||||
<small class="text-muted">This will be automatically filled with your username</small>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-warning" data-bs-dismiss="modal">Close</button>
|
||||
<div class="modal-footer bg-light">
|
||||
<div class="w-100 d-flex justify-content-between">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" form="createForm" class="btn btn-success">
|
||||
<i class="bi bi-plus-circle me-1"></i>Create Facility
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
Reference in New Issue
Block a user