|
@@ 726-729 (lines=4) @@
|
| 723 |
|
|
| 724 |
|
// Configure form to respond to validation errors with form schema |
| 725 |
|
// if requested via react. |
| 726 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 727 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 728 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 729 |
|
}); |
| 730 |
|
|
| 731 |
|
return $form; |
| 732 |
|
} |
|
@@ 1095-1098 (lines=4) @@
|
| 1092 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1093 |
|
$form = $handler->Form($record); |
| 1094 |
|
|
| 1095 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1096 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1097 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1098 |
|
}); |
| 1099 |
|
|
| 1100 |
|
return $form; |
| 1101 |
|
} |