[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/form/field/subform/repeatable/ -> section-byfieldsets.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2016 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\Form\Form;
  14  use Joomla\CMS\Language\Text;
  15  
  16  extract($displayData);
  17  
  18  /**
  19   * Layout variables
  20   * -----------------
  21   * @var   Form    $form       The form instance for render the section
  22   * @var   string  $basegroup  The base group name
  23   * @var   string  $group      Current group name
  24   * @var   array   $buttons    Array of the buttons that will be rendered
  25   */
  26  ?>
  27  
  28  <div class="subform-repeatable-group" data-base-name="<?php echo $basegroup; ?>" data-group="<?php echo $group; ?>">
  29      <?php if (!empty($buttons)) : ?>
  30      <div class="btn-toolbar text-end">
  31          <div class="btn-group">
  32              <?php if (!empty($buttons['add'])) :
  33                  ?><button type="button" class="group-add btn btn-sm btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>"><span class="icon-plus icon-white" aria-hidden="true"></span> </button><?php
  34              endif; ?>
  35              <?php if (!empty($buttons['remove'])) :
  36                  ?><button type="button" class="group-remove btn btn-sm btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>"><span class="icon-minus icon-white" aria-hidden="true"></span> </button><?php
  37              endif; ?>
  38              <?php if (!empty($buttons['move'])) :
  39                  ?><button type="button" class="group-move btn btn-sm btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>"><span class="icon-arrows-alt icon-white" aria-hidden="true"></span> </button><?php
  40              endif; ?>
  41          </div>
  42      </div>
  43      <?php endif; ?>
  44      <div class="row">
  45          <?php foreach ($form->getFieldsets() as $fieldset) : ?>
  46          <fieldset class="<?php if (!empty($fieldset->class)) {
  47              echo $fieldset->class;
  48                           } ?>">
  49              <?php if (!empty($fieldset->label)) : ?>
  50                  <legend><?php echo Text::_($fieldset->label); ?></legend>
  51              <?php endif; ?>
  52              <?php foreach ($form->getFieldset($fieldset->name) as $field) : ?>
  53                  <?php echo $field->renderField(); ?>
  54              <?php endforeach; ?>
  55          </fieldset>
  56          <?php endforeach; ?>
  57      </div>
  58  </div>


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