Как прописать переносы строк.

D
На сайте с 28.06.2008
Offline
1114
741

Господа, у меня есть небольшой каталог вакансий, скажем так. Это компонент для Joomla 1.5

Так вот когда соискатель добавляет описание (резюме по сути), до в процессе добавления оно выглядит красиво, а публикуется на сайте сплошным текстом. Т.е. не учитываются переносы строк. Можете подсказать что в этом файлике изменить, чтобы убрать баг?

<?php

defined('_JEXEC') or die('Restricted access');



class ViewSubjects {

function display($items) {

JToolBarHelper::title(JText::_('tutor'), 'generic.png');

JToolBarHelper::addNewX();
JToolBarHelper::editListX();
JToolBarHelper::deleteList();
JToolBarHelper::preferences('com_tutor');

?>
<form action="index.php?option=com_tutor&s=subjects" method="post" name="adminForm">

<div id="tablecell">
<table class="adminlist">
<thead>
<tr>
<th style="width:5%;">
<?php echo JText::_( 'NUM' ); ?>
</th>
<th style="width:5%;">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $items ); ?>);" />
</th>
<th class="title" style="width89%;">
<?php echo JHTML::_('grid.sort', 'subject Name', 'm.name', @$lists['order_Dir'], @$lists['filter_order'] ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="11">
<?php //echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>

<?php
$k = 0;
$n=count( $items );
for ($i=0; $i < $n; $i++)
{
$row = $items[$i];
$checked = JHTML::_('grid.checkedout', $row, $i );
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $i+1; ?>
</td>
<td>
<?php echo $checked; ?>
</td>
<td align="left">
<?php echo $row->name; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
</div>

<input type="hidden" name="option" value="com_tutor" />
<input type="hidden" name="s" value="subjects" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>

<?php
}

function displayEditForm($item) {

$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
$edit=JRequest::getVar( 'edit', true );
JArrayHelper::toInteger($cid, array(0));

$text = ( $edit ? JText::_( 'Edit' ) : JText::_( 'New' ) );

JToolBarHelper::title( JText::_('tutor').': <small><small>[ ' . $text.' ]</small></small>' );

JToolBarHelper::save();
JToolBarHelper::apply();
if ($edit) {
// for existing items the button is renamed `close`
JToolBarHelper::cancel( 'cancel', 'Close' );
} else {
JToolBarHelper::cancel();
}
?>


<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// do field validation
/*if (form.lamp.value == "") {
alert( "<?php echo JText::_( 'Record must have a lamp name', true ); ?>" );
} else {*/
submitform( pressbutton );
/*}*/
}
</script>


<form action="index.php?option=com_tutor&s=subjects" method="post" name="adminForm">


<div class="col" style="float:left; width:60%; padding: 0 1%; ">
<fieldset class="adminform">
<legend><?php echo JText::_( 'Details' ); ?></legend>
<table class="admintable" style="width:99%;">
<tr>
<td style="width:30%;" class="key">
<?php echo JText::_( 'subject Name' ); ?>:
</td>
<td>
<input type="text" name="name" style="width:85%;" value="<?php echo $item->name; ?>" />
</td>
</tr>
</table>
</fieldset>
</div>

<input type="hidden" name="task" value="" />
<input type="hidden" name="option" value="com_tutor" />
<input type="hidden" name="s" value="subjects" />
<input type="hidden" name="id" value="<?php echo $cid[0]; ?>" />
<input type="hidden" name="cid[]" value="<?php echo $cid[0]; ?>" />
<input type="hidden" name="textfieldcheck" value="<?php echo $n; ?>" />
<?php echo JHTML::_( 'form.token' );?>
</form>

<?php
}

}

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий