|
@@ 716-719 (lines=4) @@
|
| 713 |
|
|
| 714 |
|
// Configure form to respond to validation errors with form schema |
| 715 |
|
// if requested via react. |
| 716 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) { |
| 717 |
|
$schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId); |
| 718 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 719 |
|
}); |
| 720 |
|
|
| 721 |
|
return $form; |
| 722 |
|
} |
|
@@ 1055-1058 (lines=4) @@
|
| 1052 |
|
$handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
| 1053 |
|
$form = $handler->Form($record); |
| 1054 |
|
|
| 1055 |
|
$form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) { |
| 1056 |
|
$schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id); |
| 1057 |
|
return $this->getSchemaResponse($schemaId, $form, $errors); |
| 1058 |
|
}); |
| 1059 |
|
|
| 1060 |
|
return $form; |
| 1061 |
|
} |