|
@@ 849-852 (lines=4) @@
|
| 846 |
|
|
| 847 |
|
// Configure form to respond to validation errors with form schema |
| 848 |
|
// if requested via react. |
| 849 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 850 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 851 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 852 |
|
}); |
| 853 |
|
|
| 854 |
|
return $form; |
| 855 |
|
} |
|
@@ 1200-1203 (lines=4) @@
|
| 1197 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1198 |
|
$form = $handler->Form($record); |
| 1199 |
|
|
| 1200 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1201 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1202 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1203 |
|
}); |
| 1204 |
|
|
| 1205 |
|
return $form; |
| 1206 |
|
} |