Skip to content

Commit

Permalink
Merge pull request #213 from pravinTek/release1.4.4
Browse files Browse the repository at this point in the history
Task #208 chore: made changes in list field layout
  • Loading branch information
ankush-maherwal authored Nov 21, 2019
2 parents b38134e + 5d2fde5 commit 333605a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site/helpers/tjfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public function saveFieldsValue($data)

$this->saveMultiValuedFieldData($fieldValue, $field->client, $data['content_id'], $field->id, $fieldStoredValues);
}
else
elseif (!empty($fieldValue))
{
// Check other option enable for tjlist field

Expand Down
18 changes: 15 additions & 3 deletions site/layouts/fields/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 "<br>";
}
}
else
Expand All @@ -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 "<br>";
}
elseif ($value != Text::_('COM_TJFIELDS_TJLIST_OTHER_OPTION_VALUE'))
{
echo Text::_(ucfirst(str_replace($field->type . ':-', '', $value)));
echo "<br>";
}
}
}
}
}

0 comments on commit 333605a

Please sign in to comment.