|
@@ 1003-1006 (lines=4) @@
|
| 1000 |
|
|
| 1001 |
|
// Configure form to respond to validation errors with form schema |
| 1002 |
|
// if requested via react. |
| 1003 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 1004 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 1005 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1006 |
|
}); |
| 1007 |
|
|
| 1008 |
|
return $form; |
| 1009 |
|
} |
|
@@ 1372-1375 (lines=4) @@
|
| 1369 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1370 |
|
$form = $handler->Form($record); |
| 1371 |
|
|
| 1372 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1373 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1374 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1375 |
|
}); |
| 1376 |
|
|
| 1377 |
|
return $form; |
| 1378 |
|
} |