|
@@ 924-927 (lines=4) @@
|
| 921 |
|
|
| 922 |
|
// Configure form to respond to validation errors with form schema |
| 923 |
|
// if requested via react. |
| 924 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 925 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 926 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 927 |
|
}); |
| 928 |
|
|
| 929 |
|
return $form; |
| 930 |
|
} |
|
@@ 1287-1290 (lines=4) @@
|
| 1284 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1285 |
|
$form = $handler->Form($record); |
| 1286 |
|
|
| 1287 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1288 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1289 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1290 |
|
}); |
| 1291 |
|
|
| 1292 |
|
return $form; |
| 1293 |
|
} |