?> <div class="grid"> <div class="col span-half"> <?php if ($this->error) { ?> <p class="error"><?php echo $this->error; ?> </p> <?php } ?> <?php if ($this->action != 'dev' && $this->status['state'] != \Components\Tools\Helpers\Html::getStatusNum('Published')) { ?> <?php if ($this->action == 'confirm' or $this->action == 'edit') { ?> <h4><?php echo Lang::txt('COM_TOOLS_VERSION_PLS_CONFIRM'); ?> <?php echo $this->action == 'edit' ? Lang::txt('COM_TOOLS_NEXT') : Lang::txt('COM_TOOLS_THIS'); ?> <?php echo Lang::txt('COM_TOOLS_TOOL_RELEASE'); ?> :</h4> <?php
?> " method="post" id="versionForm" name="versionForm"> <fieldset class="versionfield"> <div class="grid"> <div class="col span-half"> <input type="hidden" name="option" value="<?php echo $this->option; ?> " /> <input type="hidden" name="controller" value="<?php echo $this->controller; ?> " /> <input type="hidden" name="task" value="finalizeversion" /> <input type="hidden" name="newstate" value="<?php echo \Components\Tools\Helpers\Html::getStatusNum('Approved'); ?> " /> <input type="hidden" name="id" value="<?php echo $this->status['toolid']; ?> " /> <input type="hidden" name="app" value="<?php echo $this->status['toolname']; ?> " /> <?php echo Html::input('token'); ?> <div> <h4>Tool Information <a class="edit button" href="<?php
/** * Cancel a tool contribution * * @return void */ public function cancelTask() { // get vars if (!$this->_toolid) { $this->_toolid = Request::getInt('toolid', 0); } // Create a Tool object $obj = new \Components\Tools\Tables\Tool($this->database); // do we have an alias? if ($this->_toolid == 0) { if ($alias = Request::getVar('app', '')) { $this->_toolid = $obj->getToolId($alias); } } // check access rights if (!$this->_checkAccess($this->_toolid)) { App::abort(403, Lang::txt('COM_TOOLS_ALERTNOTAUTH')); return; } // get tool status $obj->getToolStatus($this->_toolid, $this->_option, $status, 'dev'); if (!$status) { App::abort(404, Lang::txt('COM_TOOLS_ERR_EDIT_CANNOT_FIND')); return; } if ($status['state'] == \Components\Tools\Helpers\Html::getStatusNum('Abandoned')) { App::abort(404, Lang::txt('COM_TOOLS_ERR_ALREADY_CANCELLED')); return; } if ($status['published'] == 1) { App::abort(404, Lang::txt('COM_TOOLS_ERR_CANNOT_CANCEL_PUBLISHED_TOOL')); return; } // unpublish resource page include_once __DIR__ . DS . 'resource.php'; $resource = new Resource(); $resource->updatePage($status['resourceid'], $status, '4'); // change tool status to 'abandoned' and priority to 'lowest' $obj->updateTool($this->_toolid, \Components\Tools\Helpers\Html::getStatusNum('Abandoned'), 5); // add comment to ticket $this->_updateTicket($this->_toolid, '', '', Lang::txt('COM_TOOLS_NOTICE_TOOL_CANCELLED'), 0, 1, 5); // continue output App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=pipeline'), Lang::txt('COM_TOOLS_NOTICE_TOOL_CANCELLED')); }