|
@@ 649-652 (lines=4) @@
|
| 646 |
|
|
| 647 |
|
// Configure form to respond to validation errors with form schema |
| 648 |
|
// if requested via react. |
| 649 |
|
$form->setValidationResponseCallback(function() use ($form, $file) { |
| 650 |
|
$schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $file->exists() ? $file->ID : ''); |
| 651 |
|
return $this->getSchemaResponse($form, $schemaId); |
| 652 |
|
}); |
| 653 |
|
|
| 654 |
|
return $form; |
| 655 |
|
} |
|
@@ 1022-1025 (lines=4) @@
|
| 1019 |
|
$handler = AddToCampaignHandler::create($this, $record); |
| 1020 |
|
$form = $handler->Form($record); |
| 1021 |
|
|
| 1022 |
|
$form->setValidationResponseCallback(function() use ($form, $id) { |
| 1023 |
|
$schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id); |
| 1024 |
|
return $this->getSchemaResponse($form, $schemaId); |
| 1025 |
|
}); |
| 1026 |
|
|
| 1027 |
|
return $form; |
| 1028 |
|
} |