2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<main>
|
2016-01-04 10:53:03 -05:00
|
|
|
<h2>Edit Anime Collection Item</h2>
|
2015-07-02 14:04:04 -04:00
|
|
|
<form action="<?= $action_url ?>" method="post">
|
2016-01-04 10:53:03 -05:00
|
|
|
<table class="form">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<h3><?= $escape->html($item['title']) ?></h3>
|
|
|
|
<?php if($item['alternate_title'] != ""): ?>
|
2017-01-16 14:14:45 -05:00
|
|
|
<h4><?= $item['alternate_title'] ?></h4>
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php endif ?>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<article class="media">
|
2017-01-16 13:49:51 -05:00
|
|
|
<?= $helper->img($item['cover_image']); ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
</article>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td><label for="media_id">Media</label></td>
|
|
|
|
<td>
|
|
|
|
<select name="media_id" id="media_id">
|
|
|
|
<?php foreach($media_items as $id => $name): ?>
|
|
|
|
<option <?= $item['media_id'] == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $name ?></option>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><label for="notes">Notes</label></td>
|
|
|
|
<td><textarea id="notes" name="notes"><?= $escape->html($item['notes']) ?></textarea></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
<?php if($action === 'Edit'): ?>
|
|
|
|
<input type="hidden" name="hummingbird_id" value="<?= $item['hummingbird_id'] ?>" />
|
|
|
|
<?php endif ?>
|
|
|
|
<button type="submit">Save</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-07-02 14:04:04 -04:00
|
|
|
</form>
|
2016-04-14 19:10:03 -04:00
|
|
|
<fieldset>
|
|
|
|
<legend>Danger Zone</legend>
|
|
|
|
<form class="js-delete" action="<?= $url->generate('collection.delete') ?>" method="post">
|
|
|
|
<table class="form invisible">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
<input type="hidden" value="<?= $item['hummingbird_id'] ?>" name="hummingbird_id" />
|
|
|
|
<button type="submit" class="danger">Delete Entry</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</fieldset>
|
2015-07-02 14:04:04 -04:00
|
|
|
</main>
|
2017-02-15 15:56:10 -05:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/anime_collection') ?>"></script>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|