|
@@ 892-895 (lines=4) @@
|
| 889 |
|
|
| 890 |
|
// Configure form to respond to validation errors with form schema |
| 891 |
|
// if requested via react. |
| 892 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 893 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 894 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 895 |
|
}); |
| 896 |
|
|
| 897 |
|
return $form; |
| 898 |
|
} |
|
@@ 1247-1250 (lines=4) @@
|
| 1244 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1245 |
|
$form = $handler->Form($record); |
| 1246 |
|
|
| 1247 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1248 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1249 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1250 |
|
}); |
| 1251 |
|
|
| 1252 |
|
return $form; |
| 1253 |
|
} |