|
@@ 699-702 (lines=4) @@
|
| 696 |
|
|
| 697 |
|
// Configure form to respond to validation errors with form schema |
| 698 |
|
// if requested via react. |
| 699 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 700 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 701 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 702 |
|
}); |
| 703 |
|
|
| 704 |
|
return $form; |
| 705 |
|
} |
|
@@ 1001-1004 (lines=4) @@
|
| 998 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 999 |
|
$form = $handler->Form($record); |
| 1000 |
|
|
| 1001 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1002 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1003 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1004 |
|
}); |
| 1005 |
|
|
| 1006 |
|
return $form; |
| 1007 |
|
} |