Your IP : 216.73.216.240


Current Path : /proc/thread-self/root/proc/thread-self/root/proc/1908984/root/proc/self/root/var/tmp/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/proc/1908984/root/proc/self/root/var/tmp/phpkFcYAi

home/digilove/public_html/libraries/regularlabs/layouts/repeatable-table.php000064400000012510152354374120023466 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         23.7.24631
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            https://regularlabs.com
 * @copyright       Copyright © 2023 Regular Labs All Rights Reserved
 * @license         GNU General Public License version 2 or later
 */

defined('_JEXEC') or die;

/**
 * Layout variables
 * -----------------
 * @var array  $displayData
 * @var JForm  $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 $fieldname       The field name
 * @var string $control         The forms control
 * @var string $label           The field label
 * @var string $description     The field description
 * @var array  $buttons         Array of the buttons that will be rendered
 * @var bool   $groupByFieldset Whether group the subform fields by it`s fieldset
 */

extract($displayData);

// Add script
if ($multiple)
{
    JHtml::_('jquery.ui', ['core', 'sortable']);
    JHtml::_('script', 'system/subform-repeatable.js', ['version' => 'auto', 'relative' => true]);
}

// Build heading
$fields = $tmpl->getGroup('');

$column_count = 4;

$table_head   = [];
$table_head[] = '<th style="width:10%;">' . strip_tags($fields[$id . '__' . $fieldname . 'X__field']->label) . '</th>';
if (isset($fields[$id . '__' . $fieldname . 'X__field_comparison']))
{
    $table_head[] = '<th style="width:10%;">' . strip_tags($fields[$id . '__' . $fieldname . 'X__field_comparison']->label) . '</th>';
    $column_count++;
}
$table_head[] = '<th>' . strip_tags($fields[$id . '__' . $fieldname . 'X__field_value']->label) . '</th>';

$sublayout = 'section';

// Label will not be shown for sections layout, so reset the margin left
JFactory::getDocument()->addStyleDeclaration(
    '.subform-table-sublayout-section .controls { margin-left: 0px }'
);
?>
<div class="row-fluid">
    <div class="subform-repeatable-wrapper subform-table-layout subform-table-sublayout-<?php echo $sublayout; ?> form-vertical">
        <div
                class="subform-repeatable"
                data-bt-add="a.group-add-<?php echo $unique_subform_id; ?>"
                data-bt-remove="a.group-remove-<?php echo $unique_subform_id; ?>"
                data-bt-move="a.group-move-<?php echo $unique_subform_id; ?>"
                data-repeatable-element="tr.subform-repeatable-group-<?php echo $unique_subform_id; ?>"
                data-rows-container="tbody.rows-container-<?php echo $unique_subform_id; ?>"
                data-minimum="<?php echo $min; ?>" data-maximum="<?php echo $max; ?>"
        >
            <table class="adminlist table table-striped ">
                <thead>
                    <tr>
                        <th style="width:1%;"></th>

                        <?php echo implode('', $table_head); ?>

                        <th style="width:1%;"></th>
                    </tr>
                </thead>
                <tbody class="rows-container-<?php echo $unique_subform_id; ?>">
                    <?php foreach ($forms as $k => $form):
                        echo $this->sublayout(
                            $sublayout,
                            [
                                'form'              => $form,
                                'basegroup'         => $id . '__' . $fieldname,
                                'group'             => $id . '__' . $fieldname . $k,
                                'buttons'           => $buttons,
                                'unique_subform_id' => $unique_subform_id,
                            ]
                        );
                    endforeach; ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="<?php echo $column_count; ?>">
                            <div class="btn-group btn-group-full">
                                <a
                                        class="btn btn-mini btn-full button btn-success group-add group-add-<?php echo $unique_subform_id; ?>"
                                        aria-label="<?php echo JText::_('JGLOBAL_FIELD_ADD'); ?>"
                                >
                                    <span class="icon-plus" aria-hidden="true"></span>
                                </a>
                            </div>
                        </th>
                    </tr>
                </tfoot>
            </table>

            <?php if ($multiple) : ?>
                <template class="subform-repeatable-template-section"><?php echo trim(
                        $this->sublayout(
                            $sublayout,
                            [
                                'form'              => $tmpl,
                                'basegroup'         => $id . '__' . $fieldname,
                                'group'             => $id . '__' . $fieldname . 'X',
                                'buttons'           => $buttons,
                                'unique_subform_id' => $unique_subform_id,
                            ]
                        )
                    ); ?></template>
            <?php endif; ?>
        </div>
    </div>
</div>
home/digilove/public_html/110/layouts/joomla/form/field/subform/repeatable-table.php000064400000010617152445351000024473 0ustar00<?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;

/**
 * Make thing clear
 *
 * @var JForm   $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  $fieldname        The field name
 * @var string  $control          The forms control
 * @var string  $label            The field label
 * @var string  $description      The field description
 * @var array   $buttons          Array of the buttons that will be rendered
 * @var bool    $groupByFieldset  Whether group the subform fields by it`s fieldset
 */
extract($displayData);

// Add script
if ($multiple)
{
	JHtml::_('jquery.ui', array('core', 'sortable'));
	JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true));
}

// Build heading
$table_head = '';

if (!empty($groupByFieldset))
{
	foreach ($tmpl->getFieldsets() as $fieldset) {
		$table_head .= '<th>' . JText::_($fieldset->label);

		if ($fieldset->description)
		{
			$table_head .= '<br /><small style="font-weight:normal">' . JText::_($fieldset->description) . '</small>';
		}

		$table_head .= '</th>';
	}

	$sublayout = 'section-byfieldsets';
}
else
{
	foreach ($tmpl->getGroup('') as $field) {
		$table_head .= '<th>' . strip_tags($field->label);

		if ($field->description)
		{
			$table_head .= '<br /><small style="font-weight:normal">' . JText::_($field->description) . '</small>';
		}

		$table_head .= '</th>';
	}

	$sublayout = 'section';

	// Label will not be shown for sections layout, so reset the margin left
	JFactory::getDocument()->addStyleDeclaration(
		'.subform-table-sublayout-section .controls { margin-left: 0px }'
	);
}
?>
<div class="row-fluid">
	<div class="subform-repeatable-wrapper subform-table-layout subform-table-sublayout-<?php echo $sublayout; ?> form-vertical">
		<div
			class="subform-repeatable"
			data-bt-add="a.group-add-<?php echo $unique_subform_id; ?>"
			data-bt-remove="a.group-remove-<?php echo $unique_subform_id; ?>"
			data-bt-move="a.group-move-<?php echo $unique_subform_id; ?>"
			data-repeatable-element="tr.subform-repeatable-group-<?php echo $unique_subform_id; ?>"
			data-rows-container="tbody.rows-container-<?php echo $unique_subform_id; ?>"
			data-minimum="<?php echo $min; ?>" data-maximum="<?php echo $max; ?>"
		>
			<table class="adminlist table table-striped table-bordered">
				<thead>
					<tr>
						<?php echo $table_head; ?>
						<?php if (!empty($buttons)) : ?>
							<th style="width:8%;">
								<?php if (!empty($buttons['add'])) : ?>
									<div class="btn-group">
										<a
											class="btn btn-mini button btn-success group-add group-add-<?php echo $unique_subform_id; ?>"
											aria-label="<?php echo JText::_('JGLOBAL_FIELD_ADD'); ?>"
										>
											<span class="icon-plus" aria-hidden="true"></span>
										</a>
									</div>
								<?php endif; ?>
							</th>
						<?php endif; ?>
					</tr>
				</thead>
				<tbody class="rows-container-<?php echo $unique_subform_id; ?>">
					<?php foreach ($forms as $k => $form):
						echo $this->sublayout(
							$sublayout,
							array(
								'form' => $form,
								'basegroup' => $fieldname,
								'group' => $fieldname . $k,
								'buttons' => $buttons,
								'unique_subform_id' => $unique_subform_id,
							)
						);
					endforeach; ?>
				</tbody>
			</table>

			<?php if ($multiple) : ?>
				<template class="subform-repeatable-template-section" style="display: none;"><?php
					// Use str_replace to escape HTML in a simple way, it need for IE compatibility, and should be removed later
					echo str_replace(
							array('<', '>'),
							array('SUBFORMLT', 'SUBFORMGT'),
							trim(
								$this->sublayout(
									$sublayout,
									array(
										'form' => $tmpl,
										'basegroup' => $fieldname,
										'group' => $fieldname . 'X',
										'buttons' => $buttons,
										'unique_subform_id' => $unique_subform_id,
									)
								)
							)
					);
					?></template>
			<?php endif; ?>
		</div>
	</div>
</div>