|
@@ 773-776 (lines=4) @@
|
| 770 |
|
|
| 771 |
|
// Configure form to respond to validation errors with form schema |
| 772 |
|
// if requested via react. |
| 773 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 774 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 775 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 776 |
|
}); |
| 777 |
|
|
| 778 |
|
return $form; |
| 779 |
|
} |
|
@@ 1131-1134 (lines=4) @@
|
| 1128 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1129 |
|
$form = $handler->Form($record); |
| 1130 |
|
|
| 1131 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1132 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1133 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1134 |
|
}); |
| 1135 |
|
|
| 1136 |
|
return $form; |
| 1137 |
|
} |