mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N. 481:
1) wiki text syntax was not displayed in the description or case logs of the tickets 2) when wiki text syntax was supported, the generated hyperlinks were pointing to the console (instead of the portal) SVN:trunk[4519]
This commit is contained in:
@@ -82,11 +82,6 @@ class DateTimeField extends StringField
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetDisplayValue()
|
||||
{
|
||||
return $this->currentValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the DateOnly flag
|
||||
* @return \Combodo\iTop\Form\Field\DateTimeField
|
||||
|
||||
@@ -174,6 +174,12 @@ abstract class Field
|
||||
return $this->currentValue;
|
||||
}
|
||||
|
||||
|
||||
public function GetDisplayValue()
|
||||
{
|
||||
return $this->currentValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the field formpath
|
||||
* Usually Called by the form when adding the field
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Combodo\iTop\Form\Field;
|
||||
|
||||
use \Closure;
|
||||
use \DBObject;
|
||||
use \InlineImage;
|
||||
use \AttributeText;
|
||||
use \Combodo\iTop\Form\Field\TextField;
|
||||
|
||||
/**
|
||||
@@ -106,5 +108,20 @@ class TextAreaField extends TextField
|
||||
$this->sTransactionId = $sTransactionId;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetDisplayValue()
|
||||
{
|
||||
if ($this->GetFormat() == TextAreaField::ENUM_FORMAT_TEXT)
|
||||
{
|
||||
$sValue = $this->GetCurrentValue();
|
||||
$sValue = AttributeText::RenderWikiHtml($sValue);
|
||||
return "<div>".str_replace("\n", "<br>\n", $sValue).'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sValue = AttributeText::RenderWikiHtml($this->GetCurrentValue(), true /* wiki only */);
|
||||
return "<div class=\"HTML\">".InlineImage::FixUrls($sValue).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ use \utils;
|
||||
use \Dict;
|
||||
use \UserRights;
|
||||
use \AttributeDateTime;
|
||||
use \AttributeText;
|
||||
use \InlineImage;
|
||||
use \Combodo\iTop\Renderer\FieldRenderer;
|
||||
use \Combodo\iTop\Renderer\RenderingOutput;
|
||||
@@ -223,14 +224,7 @@ EOF
|
||||
if($sFieldClass === 'Combodo\\iTop\\Form\\Field\\TextAreaField')
|
||||
{
|
||||
$bEncodeHtmlEntities = false;
|
||||
if($this->oField->GetFormat() === TextAreaField::ENUM_FORMAT_HTML)
|
||||
{
|
||||
$sDisplayValue = $this->oField->GetCurrentValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
$sDisplayValue = utils::TextToHtml($this->oField->GetCurrentValue());
|
||||
}
|
||||
$sDisplayValue = $this->oField->GetDisplayValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -452,6 +446,8 @@ EOF
|
||||
$sEntryHeaderButtonClass = ($i < 2) ? '' : 'collapsed';
|
||||
$sEntryContentClass = ($i < 2) ? 'in' : '';
|
||||
$sEntryContentId = 'caselog_field_entry_content-' . $this->oField->GetGlobalId() . '-' . $i;
|
||||
$sEntryHtml = AttributeText::RenderWikiHtml($aEntries[$i]['message_html'], true /* wiki only */);
|
||||
$sEntryHtml = InlineImage::FixUrls($sEntryHtml);
|
||||
|
||||
// Note : We use CKEditor stylesheet to format this
|
||||
$oOutput->AddHtml(
|
||||
@@ -464,7 +460,7 @@ EOF
|
||||
</div>
|
||||
</div>
|
||||
<div class="caselog_field_entry_content collapse {$sEntryContentClass}" id="{$sEntryContentId}">
|
||||
{$aEntries[$i]['message_html']}
|
||||
{$sEntryHtml}
|
||||
</div>
|
||||
</div>
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user