From e3ca0ee1fece4b3dd319cd3bd29fcd1b5ca15d03 Mon Sep 17 00:00:00 2001 From: Pravin_s Date: Wed, 20 Nov 2019 15:54:41 +0530 Subject: [PATCH] Task #208 chore: made changes in list field layout --- site/layouts/fields/list.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/site/layouts/fields/list.php b/site/layouts/fields/list.php index 910ad1a1..39c69ff8 100644 --- a/site/layouts/fields/list.php +++ b/site/layouts/fields/list.php @@ -9,6 +9,8 @@ // No direct access defined('_JEXEC') or die('Restricted access'); +use Joomla\CMS\Language\Text; + if (!key_exists('field', $displayData) || !key_exists('fieldXml', $displayData)) { return; @@ -40,7 +42,12 @@ if (isset($options[$field->value])) { $options[$field->value] = htmlspecialchars($options[$field->value], ENT_COMPAT, 'UTF-8'); - echo JText::_(ucfirst($options[$field->value])); + echo Text::_(ucfirst($options[$field->value])); + } + elseif ($field->value != Text::_('COM_TJFIELDS_TJLIST_OTHER_OPTION_VALUE')) + { + echo Text::_(ucfirst(str_replace($field->type . ':-', '', $field->value))); + echo "
"; } } else @@ -51,9 +58,14 @@ if (isset($options[$value])) { $options[$value] = htmlspecialchars($options[$value], ENT_COMPAT, 'UTF-8'); - echo JText::_(ucfirst($options[$value])); + echo Text::_(ucfirst($options[$value])); + echo "
"; + } + elseif ($value != Text::_('COM_TJFIELDS_TJLIST_OTHER_OPTION_VALUE')) + { + echo Text::_(ucfirst(str_replace($field->type . ':-', '', $value))); echo "
"; } } } -} \ No newline at end of file +}