Commit 15a00d92 authored by jaapjansma's avatar jaapjansma
Browse files

Fixed #18

parent e8c3fd9d
......@@ -6,6 +6,8 @@
* Output a data processor as a dashboard.
* Output a data processor as a tab on the contact summary screen.
* Added field outputs for simple calculations (substract and total).
* Added escaped output to search screens.
* Replaced the value separator in the raw field with a comma.
# Version 1.0.7
......
......@@ -90,7 +90,14 @@ class RawFieldOutputHandler extends AbstractFieldOutputHandler implements Output
* @return \Civi\DataProcessor\FieldOutputHandler\FieldOutput
*/
public function formatField($rawRecord, $formattedRecord) {
return new FieldOutput($rawRecord[$this->inputFieldSpec->alias]);
$formattedValue = $rawRecord[$this->inputFieldSpec->alias];
if (strpos($formattedValue, \CRM_Core_DAO::VALUE_SEPARATOR) !== false) {
$formattedValue = explode(\CRM_Core_DAO::VALUE_SEPARATOR, substr($formattedValue, 1, -1));
$formattedValue = implode(",", $formattedValue);
}
$output = new FieldOutput($rawRecord[$this->inputFieldSpec->alias]);
$output->formattedValue = $formattedValue;
return $output;
}
/**
......@@ -175,4 +182,4 @@ class RawFieldOutputHandler extends AbstractFieldOutputHandler implements Output
}
}
\ No newline at end of file
}
......@@ -49,7 +49,7 @@
<td>{$row.contact_type}</td>
{foreach from=$columnHeaders key=headerName item=headerTitle}
{assign var=columnValue value=$record.$headerName}
<td>{$columnValue}</td>
<td>{$columnValue|escape:'html'}</td>
{/foreach}
<td>
......
......@@ -52,7 +52,7 @@
{if $id_field}<td>{$form.$cbName.html}</td>{/if}
{foreach from=$columnHeaders key=headerName item=headerTitle}
{assign var=columnValue value=$record.$headerName}
<td>{$columnValue}</td>
<td>{$columnValue|escape:'html'}</td>
{/foreach}
<td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment