<?php

/**
 *
 * bareos-webui - Bareos Web-Frontend
 *
 * @link      https://github.com/bareos/bareos for the canonical source repository
 * @copyright Copyright (C) 2013-2019 Bareos GmbH & Co. KG (http://www.bareos.org/)
 * @license   GNU Affero General Public License (http://www.gnu.org/licenses/)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

$title = 'Job Cancel';
$this->headTitle($title);

?>

<?php if($this->acl_alert) : echo $this->ACLAlert($this->invalid_commands); elseif(!$this->acl_alert) : ?>

<?php if (isset($this->cancelForm)) : ?>

<p><?php echo sprintf($this->translate('Cancel job %d?'), $this->jobid); ?></p>

<?php
$form = $this->cancelForm;
$form->prepare();
echo $this->form()->openTag($form);
echo $this->formHidden($form->get('csrf'));
echo $this->formElementErrors($form->get('csrf'));
echo $this->formSubmit($form->get('submit'));
echo $this->form()->closeTag();
?>

<?php else : ?>

<pre>
<code>
<?php echo $this->bconsoleOutput; ?>
</code>
</pre>

<?php endif; ?>

<?php endif; ?>
