Skip to content
Snippets Groups Projects
Verified Commit bf1a8aed authored by Damien's avatar Damien
Browse files

FIX #12026 TIME 1:20 Send signature positions to MP

parent fd20d01d
No related branches found
No related tags found
No related merge requests found
...@@ -215,7 +215,21 @@ class MaarchParapheurController ...@@ -215,7 +215,21 @@ class MaarchParapheurController
if ($aArgs['objectSent'] == 'attachment') { if ($aArgs['objectSent'] == 'attachment') {
if (!empty($aArgs['steps'])) { if (!empty($aArgs['steps'])) {
foreach ($aArgs['steps'] as $step) { foreach ($aArgs['steps'] as $step) {
$workflow[] = ['userId' => $step['externalId'], 'mode' => $step['action']]; $signaturePositions = null;
if (!empty($step['signaturePositions'])) {
if (is_array($step['signaturePositions'])) {
$valid = true;
foreach ($step['signaturePositions'] as $keySP => $signaturePosition) {
if (empty($signaturePosition['positionX']) || empty($signaturePosition['positionY']) || empty($signaturePosition['page'])) {
$valid = false;
}
}
if ($valid) {
$signaturePositions = $step['signaturePositions'];
}
}
}
$workflow[] = ['userId' => $step['externalId'], 'mode' => $step['action'], 'signaturePositions' => $signaturePositions];
} }
} else { } else {
return ['error' => 'steps is empty']; return ['error' => 'steps is empty'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment