Skip to content

Commit

Permalink
Bug#152970 Fix: Front end>> Text area not aligned properly at front e…
Browse files Browse the repository at this point in the history
…nd, in list view its occupy longer area.
  • Loading branch information
Aishwarya committed Dec 18, 2019
1 parent 6d718c1 commit ddac4a5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/com_tjucm/media/css/tjucm.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ margin-left:5px !important;
width:200px !important;
}

p.wordwrap-for-long-description{
p.tj-wordwrap{
word-break: break-word;
}
34 changes: 24 additions & 10 deletions src/components/com_tjucm/site/layouts/detail/fields.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* @package TJ-UCM
*
* @author TechJoomla <[email protected]>
* @package TJ-UCM
*
* @author TechJoomla <[email protected]>
* @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
Expand Down Expand Up @@ -143,7 +143,12 @@

// Call the JLayout recursively to render fields of ucmsubform
$layout = new JLayoutFile('fields', JPATH_ROOT . '/components/com_tjucm/layouts/detail');
echo $layout->render(array('xmlFormObject' => $ucmSubFormXmlFieldSets, 'formObject' => $ucmSubformFormObject, 'itemData' => $ucmSubFormRecordData, 'isSubForm' => 1));

echo $layout->render(
array('xmlFormObject' => $ucmSubFormXmlFieldSets,
'formObject' => $ucmSubformFormObject,
'itemData' => $ucmSubFormRecordData, 'isSubForm' => 1)
);
echo "<hr>";
}
}
Expand All @@ -157,7 +162,9 @@
$layoutToUse = (array_key_exists($field->type, $fieldLayout)) ? $fieldLayout[$field->type] : 'field';
?>
<div class="<?php echo $controlGroupDivClass;?>">
<div class="<?php echo $labelDivClass;?>"><?php echo $field->label; ?>:</div>
<div class="<?php echo $labelDivClass;?>">
<?php echo $field->label; ?>:
</div>
<div class="<?php echo $controlDivClass;?>">
<?php
$valueFound = 0;
Expand All @@ -178,12 +185,19 @@

$layout = new JLayoutFile($layoutToUse, JPATH_ROOT . '/components/com_tjfields/layouts/fields');
$output = $layout->render(array('fieldXml' => $xmlField, 'field' => $field));

// To align text, textarea and textareacounter fields properly
if($field->type=='Textarea'|| $field->type=='Textareacounter'|| $field->type=='Text'){
?>
<p class="wordwrap-for-long-description"><?php echo $output; ?></p><?php

if ($field->type == 'Textarea'|| $field->type == 'Textareacounter'|| $field->type == 'Text')
{
?>
<p class="tj-wordwrap">
<?php echo $output; ?>
</p>
<?php
}
//echo $output;

echo $output;
?>
</div>
</div>
Expand Down

0 comments on commit ddac4a5

Please sign in to comment.