Major version upgrade from 1.0.0 to 2.0.0 including copyright year updates, website URL migration to syspanel.com.br, and comprehensive CSRF token handling improvements. The Twig csrf() helper now returns a complete hidden input field instead of a raw token value, and token generation is now automatic when empty. Session initialization has been centralized in BaseController, and child controllers now properly call parent constructors. CRUD views have been modernized with flexbox layouts and consistent CSRF rendering. Documentation has been expanded with features, requirements, and project structure sections, and donation sections have been added across all pages.
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
<?php $_shouldextend[1]=1; ?>
|
|
|
|
<?php $this->startSection('title', 'Crud Example Create'); ?>
|
|
|
|
<?php $this->startSection('content'); ?>
|
|
<div class="container mt-5">
|
|
<h1 class="text-success">Blade - Crud Example New Item</h1>
|
|
|
|
<!-- Display error message if any -->
|
|
<?php if($error): ?>
|
|
<div class="alert alert-danger">
|
|
<?php echo \htmlentities($error??'', ENT_QUOTES, 'UTF-8', false); ?>
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<form action="/crudexample" method="POST">
|
|
<?= csrf() ?>
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Name:</label>
|
|
<input type="text" id="name" name="name" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">Password:</label>
|
|
<input type="password" id="password" name="password" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="company" class="form-label">Company:</label>
|
|
<input type="text" id="company" name="company" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="address" class="form-label">Address:</label>
|
|
<input type="text" id="address" name="address" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="phone" class="form-label">Phone:</label>
|
|
<input type="text" id="phone" name="phone" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">Email:</label>
|
|
<input type="email" id="email" name="email" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="notes" class="form-label">Notes:</label>
|
|
<textarea id="notes" name="notes" class="form-control"></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Create</button>
|
|
</form>
|
|
</div>
|
|
<?php $this->stopSection(); ?>
|
|
|
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?> |