|
@@ 743-746 (lines=4) @@
|
| 740 |
|
|
| 741 |
|
// Configure form to respond to validation errors with form schema |
| 742 |
|
// if requested via react. |
| 743 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 744 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 745 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 746 |
|
}); |
| 747 |
|
|
| 748 |
|
return $form; |
| 749 |
|
} |
|
@@ 1097-1100 (lines=4) @@
|
| 1094 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1095 |
|
$form = $handler->Form($record); |
| 1096 |
|
|
| 1097 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1098 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1099 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1100 |
|
}); |
| 1101 |
|
|
| 1102 |
|
return $form; |
| 1103 |
|
} |