<?php
$escape = $this->plugin('escapeHtml');
$this->htmlElement('body')->appendAttribute('class', 'edit item');
$deleteButton = '<a href="#" class="delete button">' . $this->translate('Delete') . '</a>';
?>

<script type='text/javascript'>
var valuesJson = <?php echo json_encode($item->values()); ?>;
</script>

<?php echo $this->pageTitle(sprintf($this->translate('Edit Item: “%s”'), $item->displayTitle())); ?>
<?php $this->trigger('view.edit.before'); ?>
<?php
echo $this->partial('omeka/admin/item/form.phtml', [
    'form' => $form,
    'item' => $item,
    'mediaForms' => $mediaForms,
    'submitLabel' => $this->translate('Save'),
    'deleteButton' => $deleteButton,
    'sectionNavEvent' => 'view.edit.section_nav',
    'action' => 'edit',
]);
?>

<?php echo $this->deleteConfirm($item, 'item')?>

<?php $this->trigger('view.edit.after'); ?>
