File manager - Edit - /home/ferretapmx/public_html/subform.tar
Back
repeatable.php 0000644 00000005664 15231073755 0007404 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; extract($displayData); /** * Layout variables * ----------------- * @var Form $tmpl The Empty form for template * @var array $forms Array of JForm instances for render the rows * @var bool $multiple The multiple state for the form field * @var int $min Count of minimum repeating in multiple mode * @var int $max Count of maximum repeating in multiple mode * @var string $name Name of the input field. * @var string $fieldname The field name * @var string $fieldId The field ID * @var string $control The forms control * @var string $label The field label * @var string $description The field description * @var string $class Classes for the container * @var array $buttons Array of the buttons that will be rendered * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset */ if ($multiple) { // Add script Factory::getApplication() ->getDocument() ->getWebAssetManager() ->useScript('webcomponent.field-subform'); } $class = $class ? ' ' . $class : ''; $sublayout = empty($groupByFieldset) ? 'section' : 'section-byfieldsets'; ?> <div class="subform-repeatable-wrapper subform-layout"> <joomla-field-subform class="subform-repeatable<?php echo $class; ?>" name="<?php echo $name; ?>" button-add=".group-add" button-remove=".group-remove" button-move="<?php echo empty($buttons['move']) ? '' : '.group-move' ?>" repeatable-element=".subform-repeatable-group" minimum="<?php echo $min; ?>" maximum="<?php echo $max; ?>"> <?php if (!empty($buttons['add'])) : ?> <div class="btn-toolbar"> <div class="btn-group"> <button type="button" class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>"> <span class="icon-plus icon-white" aria-hidden="true"></span> </button> </div> </div> <?php endif; ?> <?php foreach ($forms as $k => $form) : echo $this->sublayout($sublayout, ['form' => $form, 'basegroup' => $fieldname, 'group' => $fieldname . $k, 'buttons' => $buttons]); endforeach; ?> <?php if ($multiple) : ?> <template class="subform-repeatable-template-section hidden"><?php echo trim($this->sublayout($sublayout, ['form' => $tmpl, 'basegroup' => $fieldname, 'group' => $fieldname . 'X', 'buttons' => $buttons])); ?></template> <?php endif; ?> </joomla-field-subform> </div> repeatable-table.php 0000644 00000012125 15231073755 0010457 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; extract($displayData); /** * Layout variables * ----------------- * @var Form $tmpl The Empty form for template * @var array $forms Array of JForm instances for render the rows * @var bool $multiple The multiple state for the form field * @var int $min Count of minimum repeating in multiple mode * @var int $max Count of maximum repeating in multiple mode * @var string $name Name of the input field. * @var string $fieldname The field name * @var string $fieldId The field ID * @var string $control The forms control * @var string $label The field label * @var string $description The field description * @var string $class Classes for the container * @var array $buttons Array of the buttons that will be rendered * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset */ if ($multiple) { // Add script Factory::getApplication() ->getDocument() ->getWebAssetManager() ->useScript('webcomponent.field-subform'); } $class = $class ? ' ' . $class : ''; // Build heading $table_head = ''; if (!empty($groupByFieldset)) { foreach ($tmpl->getFieldsets() as $k => $fieldset) { $table_head .= '<th scope="col">' . Text::_($fieldset->label); if ($fieldset->description) { $table_head .= '<span class="icon-info-circle" aria-hidden="true" tabindex="0"></span><div role="tooltip" id="tip-th-' . $fieldId . '-' . $k . '">' . Text::_($fieldset->description) . '</div>'; } $table_head .= '</th>'; } $sublayout = 'section-byfieldsets'; } else { $fields = $tmpl->getGroup(''); $th_width = 92 / count($fields); foreach ($fields as $field) { $table_head .= '<th scope="col" style="width:' . $th_width . '%">' . strip_tags($field->label); if ($field->description) { $table_head .= '<span class="icon-info-circle" aria-hidden="true" tabindex="0"></span><div role="tooltip" id="tip-' . $field->id . '">' . Text::_($field->description) . '</div>'; } $table_head .= '</th>'; } $sublayout = 'section'; // Label will not be shown for sections layout, so reset the margin left Factory::getApplication() ->getDocument() ->addStyleDeclaration('.subform-table-sublayout-section .controls { margin-left: 0px }'); } ?> <div class="subform-repeatable-wrapper subform-table-layout subform-table-sublayout-<?php echo $sublayout; ?>"> <joomla-field-subform class="subform-repeatable<?php echo $class; ?>" name="<?php echo $name; ?>" button-add=".group-add" button-remove=".group-remove" button-move="<?php echo empty($buttons['move']) ? '' : '.group-move' ?>" repeatable-element=".subform-repeatable-group" rows-container="tbody.subform-repeatable-container" minimum="<?php echo $min; ?>" maximum="<?php echo $max; ?>"> <div class="table-responsive"> <table class="table" id="subfieldList_<?php echo $fieldId; ?>"> <caption class="visually-hidden"> <?php echo Text::_('JGLOBAL_REPEATABLE_FIELDS_TABLE_CAPTION'); ?> </caption> <thead> <tr> <?php echo $table_head; ?> <?php if (!empty($buttons)) : ?> <td style="width:8%;"> <?php if (!empty($buttons['add'])) : ?> <div class="btn-group"> <button type="button" class="group-add btn btn-sm btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>"> <span class="icon-plus" aria-hidden="true"></span> </button> </div> <?php endif; ?> </td> <?php endif; ?> </tr> </thead> <tbody class="subform-repeatable-container"> <?php foreach ($forms as $k => $form) : echo $this->sublayout($sublayout, ['form' => $form, 'basegroup' => $fieldname, 'group' => $fieldname . $k, 'buttons' => $buttons]); endforeach; ?> </tbody> </table> </div> <?php if ($multiple) : ?> <template class="subform-repeatable-template-section hidden"> <?php echo trim($this->sublayout($sublayout, ['form' => $tmpl, 'basegroup' => $fieldname, 'group' => $fieldname . 'X', 'buttons' => $buttons])); ?> </template> <?php endif; ?> </joomla-field-subform> </div> repeatable-table/section.php 0000644 00000004061 15231073755 0012123 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; extract($displayData); /** * Layout variables * ----------------- * @var Form $form The form instance for render the section * @var string $basegroup The base group name * @var string $group Current group name * @var array $buttons Array of the buttons that will be rendered */ ?> <tr class="subform-repeatable-group" data-base-name="<?php echo $basegroup; ?>" data-group="<?php echo $group; ?>"> <?php foreach ($form->getGroup('') as $field) : ?> <td data-column="<?php echo strip_tags($field->label); ?>"> <?php echo $field->renderField(['hiddenLabel' => true, 'hiddenDescription' => true]); ?> </td> <?php endforeach; ?> <?php if (!empty($buttons)) : ?> <td> <div class="btn-group"> <?php if (!empty($buttons['add'])) : ?> <button type="button" class="group-add btn btn-sm btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>"> <span class="icon-plus" aria-hidden="true"></span> </button> <?php endif; ?> <?php if (!empty($buttons['remove'])) : ?> <button type="button" class="group-remove btn btn-sm btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>"> <span class="icon-minus" aria-hidden="true"></span> </button> <?php endif; ?> <?php if (!empty($buttons['move'])) : ?> <button type="button" class="group-move btn btn-sm btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>"> <span class="icon-arrows-alt" aria-hidden="true"></span> </button> <?php endif; ?> </div> </td> <?php endif; ?> </tr> repeatable-table/section-byfieldsets.php 0000644 00000004214 15231073755 0014436 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; extract($displayData); /** * Layout variables * ----------------- * @var Form $form The form instance for render the section * @var string $basegroup The base group name * @var string $group Current group name * @var array $buttons Array of the buttons that will be rendered */ ?> <tr class="subform-repeatable-group" data-base-name="<?php echo $basegroup; ?>" data-group="<?php echo $group; ?>"> <?php foreach ($form->getFieldsets() as $fieldset) : ?> <td class="<?php if (!empty($fieldset->class)) { echo $fieldset->class; } ?>"> <?php foreach ($form->getFieldset($fieldset->name) as $field) : ?> <?php echo $field->renderField(); ?> <?php endforeach; ?> </td> <?php endforeach; ?> <?php if (!empty($buttons)) : ?> <td> <div class="btn-group"> <?php if (!empty($buttons['add'])) : ?> <button type="button" class="group-add btn btn-sm btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>"> <span class="icon-plus" aria-hidden="true"></span> </button> <?php endif; ?> <?php if (!empty($buttons['remove'])) : ?> <button type="button" class="group-remove btn btn-sm btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>"> <span class="icon-minus" aria-hidden="true"></span> </button> <?php endif; ?> <?php if (!empty($buttons['move'])) : ?> <button type="button" class="group-move btn btn-sm btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>"> <span class="icon-arrows-alt" aria-hidden="true"></span> </button> <?php endif; ?> </div> </td> <?php endif; ?> </tr> repeatable-table/.htaccess 0000555 00000000355 15231073755 0011547 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>