Skip to content

Commit

Permalink
Add support for Pro header/footer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
billtomczak committed Sep 20, 2021
1 parent f72b2f7 commit 720b831
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/media/css/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ Example markup
margin-top: -2px;
}

.osdownloads-modal .osdownloads-header {
padding-bottom: 18px;
}

@media screen and (max-width: 320px) {
.osdownloads-modal {
width: 280px !important;
Expand Down
25 changes: 17 additions & 8 deletions src/site/layouts/osdownloads/buttons/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@
sprintf('<span>%s</span>', $displayData->item->download_text ?: Text::_('COM_OSDOWNLOADS_DOWNLOAD')),
$attribs
);

if ($compParams->get('download_form_translate')) :
$header = $compParams->get('download_form_header_translate');
$footer = $compParams->get('download_form_footer_translate');

$header = $header ? Text::_($header) : '';
$footer = $footer ? Text::_($footer) : '';

else :
$header = $compParams->get('download_form_header');
$footer = $compParams->get('download_form_footer');
endif;

?>
<div id="<?php echo $elementsId . '_popup'; ?>"
class="reveal-modal osdownloads-modal <?php echo FrameworkHelper::getJoomlaVersionCssClass(); ?>"
Expand All @@ -98,14 +111,11 @@ class="reveal-modal osdownloads-modal <?php echo FrameworkHelper::getJoomlaVersi
echo Text::_($compParams->get('download_form_title', 'COM_OSDOWNLOADS_BEFORE_DOWNLOAD'));
?>
</h2>

<?php
$header = $compParams->get('download_form_header');
if (!empty($header)) :
echo $header;
if ($header) :
echo sprintf('<div class="osdownloads-header">%s</div>', $header);
endif;
?>

<form action="<?php echo $actionUrl; ?>"
id="<?php echo $elementsId . '_form'; ?>"
name="<?php echo $elementsId . '_form'; ?>"
Expand Down Expand Up @@ -193,9 +203,8 @@ class="osdownloads-readmore readmore osdownloads-continue-button">
</a>

<?php
$footer = $compParams->get('download_form_footer');
if (!empty($footer)) :
echo $footer;
if ($footer) :
echo sprintf('<div class="osdownloads-footer">%s</div>', $footer);
endif;
?>

Expand Down

0 comments on commit 720b831

Please sign in to comment.