29 lines
1.5 KiB
PHP
29 lines
1.5 KiB
PHP
<div class="container mt-5">
|
|
<h2 class="text-center">Edit Location</h2>
|
|
<?php if (isset($error) && $error) : ?>
|
|
<div class="alert alert-danger" role="alert">
|
|
Please fill in all required fields!
|
|
</div>
|
|
<?php endif; ?>
|
|
<form action="/<?php echo $_SESSION['role'] ?>/location/edit/<?php echo $id ?>" method="POST" class="mt-4">
|
|
|
|
<div class="form-group">
|
|
<label for="name">Name</label>
|
|
<input type="name" name="name" id="name" class="form-control" required value="<?php echo isset($data['model']) ? $data['model']->name : '' ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="name">Location ID</label>
|
|
<input type="name" name="location_id" id="location_id" class="form-control" required value="<?php echo isset($data['model']) ? $data['model']->location_id : '' ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="name">Webhook</label>
|
|
<input type="name" name="webhook" id="webhook" class="form-control" required value="<?php echo isset($data['model']) ? $data['model']->webhook : '' ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="relationship_num">API KEY</label>
|
|
<input type="text" name="apikey" id="apikey" class="form-control" required value="<?php echo isset($data['model']) ? $data['model']->apikey : '' ?>">
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
</form>
|
|
</div>
|