Fix & settings component
This commit is contained in:
@ -6,18 +6,49 @@ use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
// Load behaviors
|
||||
HTMLHelper::_('behavior.multiselect');
|
||||
HTMLHelper::_('bootstrap.tooltip');
|
||||
|
||||
// State & ordering
|
||||
$listOrder = $this->state->get('list.ordering', 'f.data_firma');
|
||||
$listDirn = $this->state->get('list.direction', 'DESC');
|
||||
|
||||
// Carica CSS base
|
||||
HTMLHelper::_('bootstrap.tooltip');
|
||||
HTMLHelper::_('behavior.multiselect');
|
||||
HTMLHelper::_('formbehavior.chosen', 'select');
|
||||
?>
|
||||
<form action="<?php echo Route::_('index.php?option=com_circolari&view=reportfirme'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div id="j-main-container" class="j-main-container">
|
||||
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
|
||||
// Prendi il form filtri SENZA accedere a property protette
|
||||
$filterForm = $this->get('FilterForm');
|
||||
$activeFilters = $this->get('ActiveFilters');
|
||||
|
||||
// URL base della view
|
||||
$action = Route::_('index.php?option=com_circolari&view=reportfirme');
|
||||
|
||||
// Link export CSV (rispetta i filtri correnti mantenendo la query string del form)
|
||||
$exportLink = Route::_('index.php?option=com_circolari&task=reportfirme.exportCsv&' . Session::getFormToken() . '=1');
|
||||
?>
|
||||
<form action="<?php echo $action; ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div id="j-main-container" class="j-main-container">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h2 class="m-0">Report Firme</h2>
|
||||
|
||||
<a class="btn btn-outline-secondary btn-sm"
|
||||
href="<?php echo $exportLink; ?>"
|
||||
title="Scarica CSV">
|
||||
Scarica CSV
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if ($filterForm) : ?>
|
||||
<?php
|
||||
// Passa esplicitamente form e activeFilters per evitare accesso a property protette
|
||||
echo LayoutHelper::render('joomla.searchtools.default', [
|
||||
'view' => $this,
|
||||
'form' => $filterForm,
|
||||
'activeFilters' => $activeFilters,
|
||||
]);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user