<?php
$this->headScript()->appendFile($this->assetUrl('js/vocabulary-form.js', 'Omeka'));
$this->htmlElement('body')->appendAttribute('class', 'edit vocabularies');
$translate = $this->plugin('translate');
$form->prepare();
?>

<?php echo $this->pageTitle($translate($vocabulary->label()), 1, $translate('Vocabularies'), $translate('Edit')); ?>
<?php $this->trigger('view.edit.before'); ?>
<?php echo $this->form()->openTag($form); ?>
<div id="page-actions">
    <?php $this->trigger('view.edit.page_actions', ['resource' => $vocabulary]); ?>
    <a href="#" class="delete button"><?php echo $translate('Delete'); ?></a>
    <?php echo $this->cancelButton(); ?>
    <button><?php echo $translate('Save'); ?></button>
</div>
<?php $this->trigger('view.edit.form.before', ['form' => $form]); ?>
<?php echo $this->formRow($form->get('csrf')); ?>
<?php echo $this->formCollection($form->get('vocabulary-info')); ?>
<p><?php echo $this->translate('You may update this vocabulary to a newer version. You will be able to review the changes before you accept.'); ?></p>
<?php echo $this->formCollection($form->get('vocabulary-file')); ?>
<?php echo $this->formCollection($form->get('vocabulary-advanced')); ?>
<?php $this->trigger('view.edit.form.after', ['form' => $form]); ?>
<?php echo $this->form()->closeTag(); ?>
<?php echo $this->deleteConfirm($vocabulary, 'vocabulary'); ?>

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