CoreFiles by mySites.guru
edit.php94 lines, 3,329 bytes, from Joomla_4.0.0-beta4-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta3
md5
f814740b962c08f4b6df5e2f80c1a303
sha1
1fffd7eb77709439f2d0fe0d81805b6719e218ba
sha256
d75ca9ee029fa5c0dc5f69241ac6ab2f6e0a8970b47794069df5f70642f25ce2
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_workflow
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @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;

HTMLHelper::_('behavior.formvalidator');
HTMLHelper::_('behavior.keepalive');

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

// In case of modal
$isModal  = $input->get('layout') === 'modal';
$layout   = $isModal ? 'modal' : 'edit';
$tmpl     = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';
$clientId = $this->state->get('item.client_id', 0);
$lang     = Factory::getLanguage()->getTag();
?>

<form action="<?php echo Route::_('index.php?option=com_workflow&view=workflow&extension=' . $input->getCmd('extension') . '&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="workflow-form" class="form-validate">

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

	<?php // Add the translation of the workflow item title when client is administrator ?>
	<?php if ($clientId === 0 && $this->item->id != 0) : ?>
		<div class="row title-alias form-vertical mb-3">
			<div class="col-12">
				<div class="control-group">
					<div class="control-label">
						<label for="workflow_title_translation"><?php echo Text::sprintf('COM_WORKFLOW_TITLE_TRANSLATION', $lang); ?></label>
					</div>
					<div class="controls">
						<input id="workflow_title_translation" class="form-control" value="<?php echo Text::_($this->item->title); ?>" readonly="readonly" type="text">
					</div>
				</div>
			</div>
		</div>
	<?php endif; ?>

	<div>
		<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?>

		<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'description', Text::_('COM_WORKFLOW_DESCRIPTION'));?>
		<div class="row">
			<div class="col-lg-9">
				<div class="card card-block">
					<div class="card-body form-vertical">
					<?php echo $this->form->renderField('description'); ?>
					</div>
				</div>
			</div>
			<div class="col-lg-3">
				<div class="card card-block">
					<div class="card-body">
						<fieldset class="form-vertical">
							<?php echo $this->form->renderField('published'); ?>
							<?php echo $this->form->renderField('default'); ?>
						</fieldset>
					</div>
				</div>
			</div>
		</div>
		<?php echo HTMLHelper::_('uitab.endTab'); ?>

		<?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('extension'); ?>
	<input type="hidden" name="task" value="workflow.edit" />
	<?php echo HTMLHelper::_('form.token'); ?>
</form>

The same content is in 2 releases, Joomla 4.0.0-beta4 to 4.0.0-beta5. See them all, or every version of this file.