Skip to content

Commit

Permalink
replace hard coded icons by JLayout iconclass
Browse files Browse the repository at this point in the history
  • Loading branch information
hans2103 committed Sep 14, 2020
1 parent 233b49f commit fed10b3
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 40 deletions.
3 changes: 2 additions & 1 deletion administrator/components/com_admin/tmpl/profile/edit.php
Expand Up @@ -75,7 +75,8 @@ class="form-validate"
</div>
<?php if (empty($this->otpConfig->otep)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_ADMIN_PROFILE_OTEPS_WAIT_DESC'); ?>
</div>
<?php else : ?>
Expand Down
Expand Up @@ -71,7 +71,8 @@ protected function getInput()
. ' data-select="' . Text::_('COM_ASSOCIATIONS_SELECT_TARGET') . '"'
. ' data-change="' . Text::_('COM_ASSOCIATIONS_CHANGE_TARGET') . '"'
. ' data-target="#associationSelect' . $this->id . 'Modal">'
. '<span class="fas fa-file" aria-hidden="true"></span> '
. LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'file'])
. ' '
. '<span id="select-change-text"></span>'
. '</button>';

Expand Down
Expand Up @@ -12,6 +12,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

// Load JavaScript message titles
Expand Down Expand Up @@ -45,7 +46,8 @@

<?php if (!$tabs) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_INSTALLER_NO_INSTALLATION_PLUGINS_FOUND'); ?>
</div>
<?php endif; ?>
Expand Down
Expand Up @@ -24,7 +24,7 @@
<?php foreach ($this->messages as $message) : ?>
<div class="alert alert-warning">
<h4 class="alert-heading">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo $message['message']; ?>
</h4>
Expand Down
Expand Up @@ -34,7 +34,7 @@
<?php foreach ($this->warnings as $warning) : ?>
<div class="alert alert-warning">
<h4 class="alert-heading">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo $warning['message']; ?>
</h4>
Expand Down
Expand Up @@ -38,15 +38,15 @@
<?php else : ?>
<?php if (!in_array($this->default_lang, $content_languages)) : ?>
<div class="alert alert-error">
<span class="fas fa-exclamation" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'error']); ?>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_DEFAULT_CONTENT_LANGUAGE', $this->default_lang); ?>
</div>
<?php else : ?>
<?php foreach ($this->contentlangs as $contentlang) : ?>
<?php if ($contentlang->lang_code == $this->default_lang && $contentlang->published != 1) : ?>
<div class="alert alert-error">
<span class="fas fa-exclamation" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'error']); ?>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_DEFAULT_CONTENT_LANGUAGE', $this->default_lang); ?>
</div>
Expand All @@ -55,7 +55,7 @@
<?php endif; ?>
<?php if ($this->defaultHome == true) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_DEFAULT_HOME_MODULE_PUBLISHED'); ?>
</div>
Expand All @@ -64,67 +64,67 @@
<?php // Displays error when Site language and Content language are published but Home page is unpublished, trashed or missing. ?>
<?php if ($status->lang_code && $status->published == 1 && $status->home_published != 1) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_HOME_UNPUBLISHED', $status->lang_code, $status->lang_code); ?>
</div>
<?php endif; ?>
<?php // Displays error when both Content Language and Home page are unpublished. ?>
<?php if ($status->lang_code && $status->published == 0 && $status->home_published != 1) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_HOME_UNPUBLISHED', $status->lang_code, $status->lang_code); ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($notice_disabled) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_LANGUAGEFILTER_DISABLED'); ?>
</div>
<?php endif; ?>
<?php if ($notice_switchers) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_LANGSWITCHER_UNPUBLISHED'); ?>
</div>
<?php endif; ?>
<?php foreach ($this->contentlangs as $contentlang) : ?>
<?php if (array_key_exists($contentlang->lang_code, $this->homepages) && (!array_key_exists($contentlang->lang_code, $this->site_langs) || $contentlang->published != 1)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_CONTENT_LANGUAGE', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php if (!array_key_exists($contentlang->lang_code, $this->site_langs)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_ERROR_LANGUAGE_TAG', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php if ($contentlang->published == -2) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_TRASHED', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php if (empty($contentlang->sef)) : ?>
<div class="alert alert-error">
<span class="fas fa-exclamation" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'error']); ?>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_SEF_MISSING', $contentlang->lang_code); ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($this->listUsersError) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR_TIP'); ?>
<ul>
Expand All @@ -140,7 +140,7 @@
<?php foreach ($sitelangs as $sitelang) : ?>
<?php if (!in_array($sitelang, $content_languages) && in_array($sitelang, $home_pages)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::sprintf('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_MISSING', $sitelang); ?>
</div>
Expand Down Expand Up @@ -249,7 +249,7 @@
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'trash']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php else : ?>
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php endif; ?>
</td>
Expand All @@ -265,7 +265,7 @@
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'trash']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php else : ?>
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php endif; ?>
</td>
Expand All @@ -278,7 +278,7 @@
<?php echo $contentlang->lang_code; ?>
</th>
<td class="text-center">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
</td>
<td class="text-center">
Expand All @@ -295,7 +295,7 @@
</td>
<td class="text-center">
<?php if (!array_key_exists($contentlang->lang_code, $this->homepages)) : ?>
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php else : ?>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'check', 'suffix' => 'text-success']); ?>
Expand All @@ -317,7 +317,7 @@
<span class="sr-only"><?php echo Text::_('JYES'); ?></span>
</td>
<td class="text-center">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
</td>
<td class="text-center">
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_modules/tmpl/module/edit.php
Expand Up @@ -119,7 +119,8 @@
<?php endif; ?>
<?php else : ?>
<div class="alert alert-danger">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::_('COM_MODULES_ERR_XML'); ?>
</div>
<?php endif; ?>
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_plugins/tmpl/plugin/edit.php
Expand Up @@ -97,7 +97,8 @@
<?php endif; ?>
<?php else : ?>
<div class="alert alert-danger">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<span class="sr-only"><?php echo Text::_('ERROR'); ?></span>
<?php echo Text::_('COM_PLUGINS_XML_ERR'); ?>
</div>
<?php endif; ?>
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_users/tmpl/user/edit.php
Expand Up @@ -95,7 +95,8 @@
</div>
<?php if (empty($this->otpConfig->otep)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_USERS_USER_OTEPS_WAIT_DESC'); ?>
</div>
<?php else : ?>
Expand Down
14 changes: 7 additions & 7 deletions administrator/modules/mod_privacy_status/tmpl/default.php
Expand Up @@ -31,12 +31,12 @@
</span>
<?php elseif ($privacyPolicyInfo['published'] && !$privacyPolicyInfo['articlePublished']) : ?>
<span class="badge badge-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="badge badge-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
Expand All @@ -60,12 +60,12 @@
</span>
<?php elseif (!$requestFormPublished['published'] && $requestFormPublished['exists']) : ?>
<span class="badge badge-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="badge badge-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
Expand All @@ -86,7 +86,7 @@
</span>
<?php else : ?>
<span class="badge badge-danger">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('WARNING'); ?>
</span>
<?php endif; ?>
Expand All @@ -108,7 +108,7 @@
</span>
<?php else : ?>
<span class="badge badge-danger">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('JDISABLED'); ?>
</span>
<?php endif; ?>
Expand All @@ -131,7 +131,7 @@
</span>
<?php else : ?>
<span class="badge badge-warning">
<span class="fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2']); ?>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
Expand Down
4 changes: 3 additions & 1 deletion administrator/modules/mod_sampledata/tmpl/default.php
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Uri\Uri;

$app->getDocument()->getWebAssetManager()
Expand Down Expand Up @@ -56,7 +57,8 @@
</ul>
<?php else : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('MOD_SAMPLEDATA_NOTAVAILABLE'); ?>
</div>
<?php endif; ?>
4 changes: 3 additions & 1 deletion components/com_privacy/tmpl/request/default.php
Expand Up @@ -11,6 +11,7 @@

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Privacy\Site\View\Request\HtmlView $this */
Expand Down Expand Up @@ -48,7 +49,8 @@
</form>
<?php else : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_PRIVACY_WARNING_CANNOT_CREATE_REQUEST_WHEN_SENDMAIL_DISABLED'); ?>
</div>
<?php endif; ?>
Expand Down
3 changes: 2 additions & 1 deletion components/com_users/tmpl/profile/edit.php
Expand Up @@ -110,7 +110,8 @@
</div>
<?php if (empty($this->otpConfig->otep)) : ?>
<div class="alert alert-warning">
<span class="fas fa-exclamation-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning']); ?>
<span class="sr-only"><?php echo Text::_('WARNING'); ?></span>
<?php echo Text::_('COM_USERS_PROFILE_OTEPS_WAIT_DESC'); ?>
</div>
<?php else : ?>
Expand Down
6 changes: 4 additions & 2 deletions installation/template/error.php
Expand Up @@ -9,6 +9,7 @@
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var JDocumentError $this */
Expand Down Expand Up @@ -63,12 +64,13 @@
<div id="container-installation" class="container-installation flex">
<div class="j-install-step active">
<div class="j-install-step-header">
<span class="fas fa-exclamation" aria-hidden="true"></span> <?php echo Text::_('INSTL_ERROR'); ?>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'error']); ?>
<?php echo Text::_('INSTL_ERROR'); ?>
</div>
<div class="j-install-step-form">
<div class="alert preinstall-alert">
<div class="alert-icon">
<span class="alert-icon fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2', 'suffix' => 'alert-icon']); ?>
</div>
<div class="alert-text">
<h2><?php echo Text::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></h2>
Expand Down
2 changes: 1 addition & 1 deletion installation/tmpl/preinstall/default.php
Expand Up @@ -28,7 +28,7 @@
<?php if ($option->state === 'JNO' || $option->state === false) : ?>
<div class="alert preinstall-alert">
<div class="alert-icon">
<span class="alert-icon fas fa-exclamation-triangle" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'warning-2', 'suffix' => 'alert-icon']); ?>
</div>
<div class="alert-text">
<strong><?php echo $option->label; ?></strong>
Expand Down

0 comments on commit fed10b3

Please sign in to comment.