52 lines
2.5 KiB
Plaintext
Executable File
52 lines
2.5 KiB
Plaintext
Executable File
<?php $_shouldextend[1]=1; ?>
|
|
|
|
<?php $this->startSection('title', 'Crud Example Edit'); ?>
|
|
|
|
<?php $this->startSection('content'); ?>
|
|
<div class="container mt-5">
|
|
<h1 class="text-warning">Blade - Crud Example Edit</h1>
|
|
<form action="/crudexample/update/<?php echo \htmlentities($crudexample['id']??'', ENT_QUOTES, 'UTF-8', false); ?>" method="POST">
|
|
<?= csrf() ?>
|
|
<input type="hidden" name="_method" value="POST"> <!-- Changed to POST -->
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Name:</label>
|
|
<input type="text" id="name" name="name" class="form-control" value="<?php echo \htmlentities($crudexample['name']??'', ENT_QUOTES, 'UTF-8', false); ?>" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">Password:</label>
|
|
<input type="password" id="password" name="password" class="form-control">
|
|
<input type="checkbox" id="showPassword" onclick="togglePassword()"> Show Password
|
|
<script>
|
|
function togglePassword() {
|
|
var passwordInput = document.getElementById('password');
|
|
var showPasswordCheckbox = document.getElementById('showPassword');
|
|
passwordInput.type = showPasswordCheckbox.checked ? 'text' : 'password';
|
|
}
|
|
</script>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="company" class="form-label">Company:</label>
|
|
<input type="text" id="company" name="company" class="form-control" value="<?php echo \htmlentities($crudexample['company']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="address" class="form-label">Address:</label>
|
|
<input type="text" id="address" name="address" class="form-control" value="<?php echo \htmlentities($crudexample['address']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="phone" class="form-label">Phone:</label>
|
|
<input type="text" id="phone" name="phone" class="form-control" value="<?php echo \htmlentities($crudexample['phone']??'', ENT_QUOTES, 'UTF-8', false); ?>">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">Email:</label>
|
|
<input type="email" id="email" name="email" class="form-control" value="<?php echo \htmlentities($crudexample['email']??'', ENT_QUOTES, 'UTF-8', false); ?>" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="notes" class="form-label">Notes:</label>
|
|
<textarea id="notes" name="notes" class="form-control"><?php echo \htmlentities($crudexample['notes']??'', ENT_QUOTES, 'UTF-8', false); ?></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
</form>
|
|
</div>
|
|
<?php $this->stopSection(); ?>
|
|
|
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?> |