First Commit
This commit is contained in:
Executable
+50
@@ -0,0 +1,50 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Create New Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Create New Crud Example</h1>
|
||||
<form action="/twigexample/store" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email:</label>
|
||||
<input type="email" id="email" name="user_email" class="form-control" required autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password:</label>
|
||||
<input type="password" id="password" name="password" class="form-control" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<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="company" class="form-label">Company:</label>
|
||||
<input type="text" id="company" name="company" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">Address:</label>
|
||||
<input type="text" id="address" name="address" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Phone:</label>
|
||||
<input type="tel" id="phone" name="phone" class="form-control" required pattern="[0-9+\-\s]+" title="Please enter a valid phone number">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">Notes:</label>
|
||||
<textarea id="notes" name="notes" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Create New Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Create New Crud Example</h1>
|
||||
<form action="/twigexample/store" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email:</label>
|
||||
<input type="email" id="email" name="user_email" class="form-control" required autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password:</label>
|
||||
<input type="password" id="password" name="password" class="form-control" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<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="company" class="form-label">Company:</label>
|
||||
<input type="text" id="company" name="company" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">Address:</label>
|
||||
<input type="text" id="address" name="address" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Phone:</label>
|
||||
<input type="tel" id="phone" name="phone" class="form-control" required pattern="[0-9+\-\s]+" title="Please enter a valid phone number">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">Notes:</label>
|
||||
<textarea id="notes" name="notes" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Edit Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Edit Crud Example</h1>
|
||||
<form action="/twigexample/update/{{ twigexample.id }}" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Name:</label>
|
||||
<input type="text" id="name" name="name" class="form-control" value="{{ twigexample.name }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="company" class="form-label">Company:</label>
|
||||
<input type="text" id="company" name="company" class="form-control" value="{{ twigexample.company }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">Address:</label>
|
||||
<input type="text" id="address" name="address" class="form-control" value="{{ twigexample.address }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Phone:</label>
|
||||
<input type="text" id="phone" name="phone" class="form-control" value="{{ twigexample.phone }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email:</label>
|
||||
<input type="email" id="email" name="email" class="form-control" value="{{ twigexample.email }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">Notes:</label>
|
||||
<textarea id="notes" name="notes" class="form-control">{{ twigexample.notes }}</textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Edit Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Edit Crud Example</h1>
|
||||
<form action="/twigexample/update/{{ twigexample.id }}" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Name:</label>
|
||||
<input type="text" id="name" name="name" class="form-control" value="{{ twigexample.name }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="company" class="form-label">Company:</label>
|
||||
<input type="text" id="company" name="company" class="form-control" value="{{ twigexample.company }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="address" class="form-label">Address:</label>
|
||||
<input type="text" id="address" name="address" class="form-control" value="{{ twigexample.address }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="phone" class="form-label">Phone:</label>
|
||||
<input type="text" id="phone" name="phone" class="form-control" value="{{ twigexample.phone }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email:</label>
|
||||
<input type="email" id="email" name="email" class="form-control" value="{{ twigexample.email }}" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notes" class="form-label">Notes:</label>
|
||||
<textarea id="notes" name="notes" class="form-control">{{ twigexample.notes }}</textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Crud Example List{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="display-4 text-primary">Twig - Crud Example List</h1>
|
||||
<a href="/twigexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Company</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in twigexample %}
|
||||
<tr>
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.company }}</td>
|
||||
<td>
|
||||
<a href="/twigexample/show/{{ item.id }}" class="btn btn-info btn-sm me-2">View</a>
|
||||
<a href="/twigexample/edit/{{ item.id }}" class="btn btn-warning btn-sm me-2">Edit</a>
|
||||
|
||||
<!-- Delete form -->
|
||||
<form action="/twigexample/delete/{{ item.id }}" method="POST" style="display:inline;">
|
||||
<input type="hidden" name="_method" value="POST">
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Crud Example List{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="display-4 text-primary">Twig - Crud Example List</h1>
|
||||
<a href="/twigexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Company</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in twigexample %}
|
||||
<tr>
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.company }}</td>
|
||||
<td>
|
||||
<a href="/twigexample/show/{{ item.id }}" class="btn btn-info btn-sm me-2">View</a>
|
||||
<a href="/twigexample/edit/{{ item.id }}" class="btn btn-warning btn-sm me-2">Edit</a>
|
||||
|
||||
<!-- Delete form -->
|
||||
<form action="/twigexample/delete/{{ item.id }}" method="POST" style="display:inline;">
|
||||
<input type="hidden" name="_method" value="POST">
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Show Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Show Crud Example</h1>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ twigexample.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ twigexample.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<td>{{ twigexample.company }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<td>{{ twigexample.address }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Phone</th>
|
||||
<td>{{ twigexample.phone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td>{{ twigexample.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Notes</th>
|
||||
<td>{{ twigexample.notes }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="/twigexample/edit/{{ twigexample.id }}" class="btn btn-warning me-2">Edit</a>
|
||||
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" style="display:inline;">
|
||||
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
|
||||
</form>
|
||||
<a href="/twigexample" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
{% extends 'layout.twig.php' %}
|
||||
|
||||
{% block title %}Show Crud Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<h1 class="display-4 text-primary">Twig - Show Crud Example</h1>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ twigexample.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ twigexample.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Company</th>
|
||||
<td>{{ twigexample.company }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<td>{{ twigexample.address }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Phone</th>
|
||||
<td>{{ twigexample.phone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td>{{ twigexample.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Notes</th>
|
||||
<td>{{ twigexample.notes }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="/twigexample/edit/{{ twigexample.id }}" class="btn btn-warning me-2">Edit</a>
|
||||
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" style="display:inline;">
|
||||
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
|
||||
</form>
|
||||
<a href="/twigexample" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user