CoreFiles by mySites.guru
edit.php83 lines, 3,580 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
5946d20205a0660849f6ee9dacbc8004
sha1
9d8cee102de651337534b07834921d294a96fac9
sha256
e6ab70d94a4cbc2474189463e8d83624bac7d186a6d9d9b61cb6c5acc3107356
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_workflow
 *
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Workflow\Administrator\View\Transition\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
$wa->useScript('keepalive')
    ->useScript('form.validate');

$app   = Factory::getApplication();
$user  = $app->getIdentity();

$this->ignore_fieldsets = ['params', 'transition', 'permissions'];
$this->useCoreUI = true;

// In case of modal
$isModal = $this->input->get('layout') === 'modal';
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $this->input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';

?>

<form action="<?php echo Route::_('index.php?option=com_workflow&view=transition&workflow_id=' . $this->workflowID . '&extension=' . $this->input->getCmd('extension') . '&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="workflow-form" aria-label="<?php echo Text::_('COM_WORKFLOW_TRANSITION_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
    <?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
    <div class="main-card">
        <?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>

        <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_WORKFLOW_TRANSITION')); ?>
        <div class="row">
            <div class="col-lg-9">
                <?php
                if ($isModal) {
                    $fromStage = $app->getInput()->get('from_stage_id');
                    $toStage = $app->getInput()->get('to_stage_id');
                    if ($fromStage && $toStage) {
                        $this->form->setFieldAttribute('from_stage_id', 'default', $fromStage);
                        $this->form->setFieldAttribute('to_stage_id', 'default', $toStage);
                    }
                }
                ?>
                <?php echo $this->form->renderField('from_stage_id'); ?>
                <?php echo $this->form->renderField('to_stage_id'); ?>
                <?php echo $this->form->renderField('description'); ?>
            </div>
            <div class="col-lg-3">
                <?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
            </div>
        </div>
        <?php echo HTMLHelper::_('uitab.endTab'); ?>

        <?php echo LayoutHelper::render('joomla.edit.params', $this); ?>

        <?php if ($user->authorise('core.admin', $this->extension)) : ?>
            <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_WORKFLOW_RULES_TAB')); ?>
            <fieldset id="fieldset-rules" class="options-form">
                <legend><?php echo Text::_('COM_WORKFLOW_RULES_TAB'); ?></legend>
                <?php echo $this->form->getInput('rules'); ?>
            </fieldset>
            <?php echo HTMLHelper::_('uitab.endTab'); ?>
        <?php endif; ?>

        <?php echo HTMLHelper::_('uitab.endTabSet'); ?>
    </div>
    <?php echo $this->form->getInput('workflow_id'); ?>

    <?php echo $this->form->renderControlFields(); ?>
</form>

The same content is in 30 releases, Joomla 6.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.