Skip to content

Commit

Permalink
Merge branch '4.3-dev' into tour1-4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
GeraintEdwards committed Jul 17, 2023
2 parents a40e388 + 87012fa commit 1e280f3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php // Load the batch processing form. ?>
<?php
if (
$user->authorise('core.create', $component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php // Load the batch processing form. ?>
<?php
if (
$user->authorise('core.create', $component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public function save($data)
$data['source'] = str_replace(["\r\n", "\r"], "\n", $data['source']);

// If the asset file for the template ensure we have valid template so we don't instantly destroy it
if ($fileName === '/joomla.asset.json' && json_decode($data['source']) === null) {
if (str_ends_with($fileName, '/joomla.asset.json') && json_decode($data['source']) === null) {
$this->setError(Text::_('COM_TEMPLATES_ERROR_ASSET_FILE_INVALID_JSON'));

return false;
Expand Down
19 changes: 8 additions & 11 deletions administrator/modules/mod_guidedtours/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
->getWebAssetManager()
->useScript('bootstrap.dropdown');

$lang = $app->getLanguage();

$extension = $app->getInput()->get('option');

$listTours = [];
$allTours = [];
$lang = $app->getLanguage();
$extension = $app->getInput()->get('option');
$listTours = [];
$allTours = [];
$toursCount = $params->get('tourscount', 7);

foreach ($tours as $tour) :
if (count(array_intersect(['*', $extension], $tour->extensions))) :
if ($toursCount > 0 && count(array_intersect(['*', $extension], $tour->extensions))) :
$listTours[] = $tour;
$toursCount--;
endif;

$uri = new Uri($tour->url);
Expand Down Expand Up @@ -64,10 +64,7 @@
<span class="icon-angle-down" aria-hidden="true"></span>
</button>
<div class="dropdown-menu dropdown-menu-end">
<?php foreach ($listTours as $i => $tour) : ?>
<?php if ($i >= $params->get('tourscount', 7)) : ?>
<?php break; ?>
<?php endif; ?>
<?php foreach ($listTours as $tour) : ?>
<button type="button" class="button-start-guidedtour dropdown-item" data-id="<?php echo $tour->id ?>">
<span class="icon-map-signs" aria-hidden="true"></span>
<?php echo $tour->title; ?>
Expand Down
5 changes: 3 additions & 2 deletions layouts/joomla/form/field/color/advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $checked Is this field checked?
* @var array $position Is this field checked?
* @var array $control Is this field checked?
* @var array $position Position of input.
* @var array $control The forms control.
* @var string $dataAttribute Miscellaneous data attributes preprocessed for HTML output
* @var array $dataAttributes Miscellaneous data attributes for eg, data-*.
*/
Expand All @@ -66,6 +66,7 @@
$disabled = $disabled ? ' disabled' : '';
$readonly = $readonly ? ' readonly' : '';
$hint = strlen($hint) ? ' placeholder="' . $this->escape($hint) . '"' : ' placeholder="' . $placeholder . '"';
$onchange = $onchange ? ' onchange="' . $onchange . '"' : '';
$required = $required ? ' required' : '';
$autocomplete = !empty($autocomplete) ? ' autocomplete="' . $autocomplete . '"' : '';

Expand Down
4 changes: 2 additions & 2 deletions layouts/joomla/form/field/color/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $checked Is this field checked?
* @var array $position Is this field checked?
* @var array $control Is this field checked?
* @var array $position Position of input.
* @var array $control The forms control.
* @var array $colors The specified colors
* @var string $dataAttribute Miscellaneous data attributes preprocessed for HTML output
* @var array $dataAttributes Miscellaneous data attribute for eg, data-*.
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Form/Field/GroupedlistField.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected function getGroups()
}

/**
* Method to get the field input markup fora grouped list.
* Method to get the field input markup for a grouped list.
* Multiselect is enabled by using the multiple attribute.
*
* @return string The field input markup.
Expand Down

0 comments on commit 1e280f3

Please sign in to comment.