BUG-12547 Action by email template in the 2.5 version of ProcessMaker SOLVED
- Al enviar lo correos se aprecian campos vacios que se agregan al correo. - Esto no era causa del plugin sino que al hacer una mejora para los outputdocuments se valida los campos añadiendo la etiqueta <br> que es lo que ocasionaba los espacios en el correo. se retiraron nl2br de la funcion replaceDataGridField en la class.g y se agrego la validacion en OutputDocument.php.
This commit is contained in:
@@ -1760,12 +1760,6 @@ class G
|
|||||||
|
|
||||||
if (isset($aFields[$grdName]) && is_array($aFields[$grdName])) {
|
if (isset($aFields[$grdName]) && is_array($aFields[$grdName])) {
|
||||||
foreach ($aFields[$grdName] as $aRow) {
|
foreach ($aFields[$grdName] as $aRow) {
|
||||||
foreach ($aRow as $sKey => $vValue) {
|
|
||||||
if (!is_array($vValue)) {
|
|
||||||
$aRow[$sKey] = nl2br($aRow[$sKey]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$strData = $strData . G::replaceDataField($arrayMatch2[2], $aRow);
|
$strData = $strData . G::replaceDataField($arrayMatch2[2], $aRow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1784,12 +1778,6 @@ class G
|
|||||||
|
|
||||||
$sContent = $strContentAux;
|
$sContent = $strContentAux;
|
||||||
|
|
||||||
foreach ($aFields as $sKey => $vValue) {
|
|
||||||
if (!is_array($vValue)) {
|
|
||||||
$aFields[$sKey] = nl2br($aFields[$sKey]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sContent = G::replaceDataField($sContent, $aFields);
|
$sContent = G::replaceDataField($sContent, $aFields);
|
||||||
|
|
||||||
return $sContent;
|
return $sContent;
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
public function generate($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $sTypeDocToGener = 'BOTH', $aProperties = array())
|
public function generate($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $sTypeDocToGener = 'BOTH', $aProperties = array())
|
||||||
{
|
{
|
||||||
if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
|
if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
|
||||||
$sContent = G::replaceDataGridField($sContent, $aFields);
|
$sContent = nl2br(G::replaceDataGridField($sContent, $aFields));
|
||||||
|
|
||||||
G::verifyPath($sPath, true);
|
G::verifyPath($sPath, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user