Dragon-Knight/templates/admin/edit_town.php

59 lines
1.8 KiB
PHP

<h2>Edit <?= $town['name'] ?></h2>
<form action="/admin/towns/<?= $town['id'] ?>" method="post" hx-post="/admin/towns/<?= $town['id'] ?>" hx-target="#main">
<table>
<colgroup><col><col></colgroup>
<tbody>
<tr>
<td>ID</td> <td><?= $town['id'] ?></td>
</tr>
<tr>
<td>Name</td>
<td><input type="text" name="name" value="<?= $town['name'] ?>"></td>
</tr>
<tr>
<td>Latitude</td>
<td>
<input type="number" name="latitude" value="<?= $town['latitude'] ?>"><br>
<span class="small">Positive or negative integer.</span>
</td>
</tr>
<tr>
<td>Longitude</td>
<td>
<input type="number" name="longitude" value="<?= $town['longitude'] ?>" /><br>
<span class="small">Positive or negative integer.</span>
</td>
</tr>
<tr>
<td>Inn Price</td>
<td><input type="number" name="innprice" value="<?= $town['innprice'] ?>"> gold</td>
</tr>
<tr>
<td>Map Price</td>
<td>
<input type="number" name="mapprice" value="<?= $town['mapprice'] ?>"> gold<br>
<span class="small">How much it costs to buy the map to this town.</span>
</td>
</tr>
<tr>
<td>Travel Points</td>
<td>
<input type="number" name="travelpoints" value="<?= $town['travelpoints'] ?>"><br>
<span class="small">How many TP are consumed when travelling to this town.</span>
</td>
</tr>
<tr>
<td>Items List</td>
<td>
<input type="text" name="itemslist" value="<?= $town['itemslist'] ?>"><br>
<span class="small">Comma-separated list of item ID numbers available for purchase at this town.
(Example: <span class="highlight">1,2,3,6,9,10,13,20</span>)</span>
</td>
</tr>
</tbody>
</table>
<button type="submit">Save</button>
<button type="reset">Reset</button>
</form>