[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_contact
   6   *
   7   * @copyright   (C) 2020 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  HTMLHelper::_('behavior.keepalive');
  20  HTMLHelper::_('behavior.formvalidator');
  21  
  22  $this->tab_name         = 'com-contact-form';
  23  $this->ignore_fieldsets = array('details', 'item_associations', 'language');
  24  $this->useCoreUI        = true;
  25  ?>
  26  <div class="edit item-page<?php echo $this->pageclass_sfx; ?>">
  27      <?php if ($this->params->get('show_page_heading')) : ?>
  28          <div class="page-header">
  29              <h1>
  30                  <?php echo $this->escape($this->params->get('page_heading')); ?>
  31              </h1>
  32          </div>
  33      <?php endif; ?>
  34  
  35      <form action="<?php echo Route::_('index.php?option=com_contact&id=' . (int) $this->item->id); ?>" method="post"
  36          name="adminForm" id="adminForm" class="form-validate form-vertical">
  37          <fieldset>
  38              <?php echo HTMLHelper::_('uitab.startTabSet', $this->tab_name, ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
  39              <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'details', empty($this->item->id) ? Text::_('COM_CONTACT_NEW_CONTACT') : Text::_('COM_CONTACT_EDIT_CONTACT')); ?>
  40              <?php echo $this->form->renderField('name'); ?>
  41  
  42              <?php if (is_null($this->item->id)) : ?>
  43                  <?php echo $this->form->renderField('alias'); ?>
  44              <?php endif; ?>
  45  
  46              <?php echo $this->form->renderFieldset('details'); ?>
  47              <?php echo HTMLHelper::_('uitab.endTab'); ?>
  48  
  49              <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'misc', Text::_('COM_CONTACT_FIELDSET_MISCELLANEOUS')); ?>
  50              <?php echo $this->form->getInput('misc'); ?>
  51              <?php echo HTMLHelper::_('uitab.endTab'); ?>
  52  
  53              <?php if (Multilanguage::isEnabled()) : ?>
  54                  <?php echo HTMLHelper::_('uitab.addTab', $this->tab_name, 'language', Text::_('JFIELD_LANGUAGE_LABEL')); ?>
  55                  <?php echo $this->form->renderField('language'); ?>
  56                  <?php echo HTMLHelper::_('uitab.endTab'); ?>
  57              <?php else : ?>
  58                  <?php echo $this->form->renderField('language'); ?>
  59              <?php endif; ?>
  60  
  61              <?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
  62              <?php echo HTMLHelper::_('uitab.endTabSet'); ?>
  63  
  64              <input type="hidden" name="task" value=""/>
  65              <input type="hidden" name="return" value="<?php echo $this->return_page; ?>"/>
  66              <?php echo HTMLHelper::_('form.token'); ?>
  67          </fieldset>
  68          <div class="mb-2">
  69              <button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('contact.save')">
  70                  <span class="icon-check" aria-hidden="true"></span>
  71                  <?php echo Text::_('JSAVE'); ?>
  72              </button>
  73              <button type="button" class="btn btn-danger" onclick="Joomla.submitbutton('contact.cancel')">
  74                  <span class="icon-times" aria-hidden="true"></span>
  75                  <?php echo Text::_('JCANCEL'); ?>
  76              </button>
  77              <?php if ($this->params->get('save_history', 0) && $this->item->id) : ?>
  78                  <?php echo $this->form->getInput('contenthistory'); ?>
  79              <?php endif; ?>
  80          </div>
  81      </form>
  82  </div>


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