[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_content/tmpl/form/ -> edit.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_content
   6   *
   7   * @copyright   (C) 2009 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\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Multilanguage;
  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      ->useScript('com_content.form-edit');
  24  
  25  $this->tab_name = 'com-content-form';
  26  $this->ignore_fieldsets = array('image-intro', 'image-full', 'jmetadata', 'item_associations');
  27  $this->useCoreUI = true;
  28  
  29  // Create shortcut to parameters.
  30  $params = $this->state->get('params');
  31  
  32  // This checks if the editor config options have ever been saved. If they haven't they will fall back to the original settings.
  33  $editoroptions = isset($params->show_publishing_options);
  34  
  35  if (!$editoroptions) {
  36      $params->show_urls_images_frontend = '0';
  37  }
  38  ?>
  39  <div class="edit item-page">
  40      <?php if ($params->get('show_page_heading')) : ?>
  41      <div class="page-header">
  42          <h1>
  43              <?php echo $this->escape($params->get('page_heading')); ?>
  44          </h1>
  45      </div>
  46      <?php endif; ?>
  47  
  48      <form action="<?php echo Route::_('index.php?option=com_content&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
  49          <fieldset>
  50              <?php echo HTMLHelper::_('uitab.startTabSet', $this->tab_name, ['active' => 'editor', 'recall' => true, 'breakpoint' => 768]); ?>
  51  
  52              <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'editor', Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
  53                  <?php echo $this->form->renderField('title'); ?>
  54  
  55                  <?php if (is_null($this->item->id)) : ?>
  56                      <?php echo $this->form->renderField('alias'); ?>
  57                  <?php endif; ?>
  58  
  59                  <?php echo $this->form->renderField('articletext'); ?>
  60  
  61                  <?php if ($this->captchaEnabled) : ?>
  62                      <?php echo $this->form->renderField('captcha'); ?>
  63                  <?php endif; ?>
  64              <?php echo HTMLHelper::_('uitab.endTab'); ?>
  65  
  66              <?php if ($params->get('show_urls_images_frontend')) : ?>
  67                  <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'images', Text::_('COM_CONTENT_IMAGES_AND_URLS')); ?>
  68                  <?php echo $this->form->renderField('image_intro', 'images'); ?>
  69                  <?php echo $this->form->renderField('image_intro_alt', 'images'); ?>
  70                  <?php echo $this->form->renderField('image_intro_alt_empty', 'images'); ?>
  71                  <?php echo $this->form->renderField('image_intro_caption', 'images'); ?>
  72                  <?php echo $this->form->renderField('float_intro', 'images'); ?>
  73                  <?php echo $this->form->renderField('image_fulltext', 'images'); ?>
  74                  <?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?>
  75                  <?php echo $this->form->renderField('image_fulltext_alt_empty', 'images'); ?>
  76                  <?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?>
  77                  <?php echo $this->form->renderField('float_fulltext', 'images'); ?>
  78                  <?php echo $this->form->renderField('urla', 'urls'); ?>
  79                  <?php echo $this->form->renderField('urlatext', 'urls'); ?>
  80                  <div class="control-group">
  81                      <div class="controls">
  82                          <?php echo $this->form->getInput('targeta', 'urls'); ?>
  83                      </div>
  84                  </div>
  85                  <?php echo $this->form->renderField('urlb', 'urls'); ?>
  86                  <?php echo $this->form->renderField('urlbtext', 'urls'); ?>
  87                  <div class="control-group">
  88                      <div class="controls">
  89                          <?php echo $this->form->getInput('targetb', 'urls'); ?>
  90                      </div>
  91                  </div>
  92                  <?php echo $this->form->renderField('urlc', 'urls'); ?>
  93                  <?php echo $this->form->renderField('urlctext', 'urls'); ?>
  94                  <div class="control-group">
  95                      <div class="controls">
  96                          <?php echo $this->form->getInput('targetc', 'urls'); ?>
  97                      </div>
  98                  </div>
  99                  <?php echo HTMLHelper::_('uitab.endTab'); ?>
 100              <?php endif; ?>
 101  
 102              <?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
 103  
 104              <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'publishing', Text::_('COM_CONTENT_PUBLISHING')); ?>
 105  
 106                  <?php echo $this->form->renderField('transition'); ?>
 107                  <?php echo $this->form->renderField('state'); ?>
 108                  <?php echo $this->form->renderField('catid'); ?>
 109                  <?php echo $this->form->renderField('tags'); ?>
 110                  <?php echo $this->form->renderField('note'); ?>
 111                  <?php if ($params->get('save_history', 0)) : ?>
 112                      <?php echo $this->form->renderField('version_note'); ?>
 113                  <?php endif; ?>
 114                  <?php if ($params->get('show_publishing_options', 1) == 1) : ?>
 115                      <?php echo $this->form->renderField('created_by_alias'); ?>
 116                  <?php endif; ?>
 117                  <?php if ($this->item->params->get('access-change')) : ?>
 118                      <?php echo $this->form->renderField('featured'); ?>
 119                      <?php if ($params->get('show_publishing_options', 1) == 1) : ?>
 120                          <?php echo $this->form->renderField('featured_up'); ?>
 121                          <?php echo $this->form->renderField('featured_down'); ?>
 122                          <?php echo $this->form->renderField('publish_up'); ?>
 123                          <?php echo $this->form->renderField('publish_down'); ?>
 124                      <?php endif; ?>
 125                  <?php endif; ?>
 126                  <?php echo $this->form->renderField('access'); ?>
 127                  <?php if (is_null($this->item->id)) : ?>
 128                      <div class="control-group">
 129                          <div class="control-label">
 130                          </div>
 131                          <div class="controls">
 132                              <?php echo Text::_('COM_CONTENT_ORDERING'); ?>
 133                          </div>
 134                      </div>
 135                  <?php endif; ?>
 136              <?php echo HTMLHelper::_('uitab.endTab'); ?>
 137  
 138              <?php if (Multilanguage::isEnabled()) : ?>
 139                  <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'language', Text::_('JFIELD_LANGUAGE_LABEL')); ?>
 140                      <?php echo $this->form->renderField('language'); ?>
 141                  <?php echo HTMLHelper::_('uitab.endTab'); ?>
 142              <?php else : ?>
 143                  <?php echo $this->form->renderField('language'); ?>
 144              <?php endif; ?>
 145  
 146              <?php if ($params->get('show_publishing_options', 1) == 1) : ?>
 147                  <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'metadata', Text::_('COM_CONTENT_METADATA')); ?>
 148                      <?php echo $this->form->renderField('metadesc'); ?>
 149                      <?php echo $this->form->renderField('metakey'); ?>
 150                  <?php echo HTMLHelper::_('uitab.endTab'); ?>
 151              <?php endif; ?>
 152  
 153              <?php echo HTMLHelper::_('uitab.endTabSet'); ?>
 154  
 155              <input type="hidden" name="task" value="">
 156              <input type="hidden" name="return" value="<?php echo $this->return_page; ?>">
 157              <?php echo HTMLHelper::_('form.token'); ?>
 158          </fieldset>
 159          <div class="mb-2">
 160              <button type="button" class="btn btn-primary" data-submit-task="article.apply">
 161                  <span class="icon-check" aria-hidden="true"></span>
 162                  <?php echo Text::_('JSAVE'); ?>
 163              </button>
 164              <button type="button" class="btn btn-primary" data-submit-task="article.save">
 165                  <span class="icon-check" aria-hidden="true"></span>
 166                  <?php echo Text::_('JSAVEANDCLOSE'); ?>
 167              </button>
 168              <?php if ($this->showSaveAsCopy) : ?>
 169                  <button type="button" class="btn btn-primary" data-submit-task="article.save2copy">
 170                      <span class="icon-copy" aria-hidden="true"></span>
 171                      <?php echo Text::_('JSAVEASCOPY'); ?>
 172                  </button>
 173              <?php endif; ?>
 174              <button type="button" class="btn btn-danger" data-submit-task="article.cancel">
 175                  <span class="icon-times" aria-hidden="true"></span>
 176                  <?php echo Text::_('JCANCEL'); ?>
 177              </button>
 178              <?php if ($params->get('save_history', 0) && $this->item->id) : ?>
 179                  <?php echo $this->form->getInput('contenthistory'); ?>
 180              <?php endif; ?>
 181          </div>
 182      </form>
 183  </div>


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