add csrf, submit, and table for displaying carriers
This commit is contained in:
parent
13c2464f95
commit
b80eaa2a9f
1 changed files with 30 additions and 2 deletions
|
|
@ -4,13 +4,41 @@
|
|||
<title>Carriers</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/create_carrier">
|
||||
<input name="company" type="text"/>
|
||||
<form action="/create_carrier" method="POST">
|
||||
<input type="hidden" name="csrf_name" value="{{ csrf.name }}">
|
||||
<input type="hidden" name="csrf_value" value="{{ csrf.value }}">
|
||||
<input name="companyName" type="text"/>
|
||||
<input name="contact_person" type="text"/>
|
||||
<input name="email" type="email"/>
|
||||
<input name="phone_number" type="text"/>
|
||||
<input name="notes" type="text"/>
|
||||
<button type="submit">Create Carrier</button>
|
||||
</form>
|
||||
{% if carriers %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Company</th>
|
||||
<th>Contact</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for c in carriers %}
|
||||
<tr>
|
||||
<td>{{ c.id }}</td>
|
||||
<td>{{ c.companyName }}</td>
|
||||
<td>{{ c.contact_person }}</td>
|
||||
<td>{{ c.email }}</td>
|
||||
<td>{{ c.phone_number }}</td>
|
||||
<td>{{ c.notes }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue