mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
Stubbed saveInto for LookupField so that data can't be saved on a form accidentally
This commit is contained in:
parent
65d7398c63
commit
0bf55cff39
@ -80,7 +80,7 @@ class LookupField extends DropdownField {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate this field
|
||||
* Ignore validation as the field is readonly
|
||||
*
|
||||
* @param Validator $validator
|
||||
* @return bool
|
||||
@ -89,6 +89,14 @@ class LookupField extends DropdownField {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stubbed so invalid data doesn't save into the DB
|
||||
*
|
||||
* @param DataObjectInterface $record DataObject to save data into
|
||||
*/
|
||||
public function saveInto(DataObjectInterface $record) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return LookupField
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user