[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_workflow/tmpl/stage/ -> edit.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_workflow
   6   *
   7   * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  use Joomla\CMS\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Router\Route;
  18  
  19  /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
  20  $wa = $this->document->getWebAssetManager();
  21  $wa->useScript('keepalive')
  22      ->useScript('form.validate');
  23  
  24  $app   = Factory::getApplication();
  25  $user  = $app->getIdentity();
  26  $input = $app->input;
  27  
  28  // In case of modal
  29  $isModal  = $input->get('layout') === 'modal';
  30  $layout   = $isModal ? 'modal' : 'edit';
  31  $tmpl     = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';
  32  $clientId = $this->state->get('item.client_id', 0);
  33  $lang     = Factory::getLanguage()->getTag();
  34  
  35  ?>
  36  
  37  <form action="<?php echo Route::_('index.php?option=com_workflow&view=stage&workflow_id=' . $input->getCmd('workflow_id') . '&extension=' . $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_STAGE_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
  38  
  39      <?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
  40  
  41      <?php // Add the translation of the workflow item title when client is administrator ?>
  42      <?php if ($clientId === 0 && $this->item->id != 0) : ?>
  43          <div class="row title-alias form-vertical mb-3">
  44              <div class="col-12">
  45                  <div class="control-group">
  46                      <div class="control-label">
  47                          <label for="stage_title_translation"><?php echo Text::sprintf('COM_WORKFLOW_TITLE_TRANSLATION', $lang); ?></label>
  48                      </div>
  49                      <div class="controls">
  50                          <input id="stage_title_translation" class="form-control" value="<?php echo Text::_($this->item->title); ?>" readonly="readonly" type="text">
  51                      </div>
  52                  </div>
  53              </div>
  54          </div>
  55      <?php endif; ?>
  56  
  57      <div class="main-card">
  58          <?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
  59  
  60          <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_WORKFLOW_DESCRIPTION')); ?>
  61          <div class="row">
  62              <div class="col-lg-9">
  63                  <?php echo $this->form->renderField('description'); ?>
  64              </div>
  65              <div class="col-lg-3">
  66                  <fieldset class="form-vertical">
  67                      <?php echo $this->form->renderField('published'); ?>
  68                      <?php echo $this->form->renderField('default'); ?>
  69                  </fieldset>
  70              </div>
  71          </div>
  72          <?php echo HTMLHelper::_('uitab.endTab'); ?>
  73  
  74          <?php if ($user->authorise('core.admin', $this->extension)) : ?>
  75              <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_WORKFLOW_RULES_TAB')); ?>
  76              <fieldset id="fieldset-rules" class="options-form">
  77                  <legend><?php echo Text::_('COM_WORKFLOW_RULES_TAB'); ?></legend>
  78                  <?php echo $this->form->getInput('rules'); ?>
  79              </fieldset>
  80              <?php echo HTMLHelper::_('uitab.endTab'); ?>
  81          <?php endif; ?>
  82  
  83          <?php echo HTMLHelper::_('uitab.endTabSet'); ?>
  84  
  85          <?php echo $this->form->getInput('workflow_id'); ?>
  86          <input type="hidden" name="task" value="stage.edit" />
  87          <?php echo HTMLHelper::_('form.token'); ?>
  88      </div>
  89  </form>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer