mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX Fixed a critical error saving a UserDefinedForm page type
This commit is contained in:
parent
74d69a30fe
commit
fb633252d0
@ -86,13 +86,15 @@ class EditableFormField extends DataObject {
|
|||||||
function populateFromPostData( $data ) {
|
function populateFromPostData( $data ) {
|
||||||
|
|
||||||
$this->Title = $data['Title'];
|
$this->Title = $data['Title'];
|
||||||
|
|
||||||
if(isset($data['Default'])) {
|
if(isset($data['Default'])) {
|
||||||
$this->setField('Default', $data['Default']);
|
$this->setField('Default', $data['Default']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->Sort = isset($data['Sort']) ? $data['Sort'] : null;
|
$this->Sort = isset($data['Sort']) ? $data['Sort'] : null;
|
||||||
$this->CustomParameter = $data['CustomParameter'];
|
$this->CustomParameter = isset($data['CustomParameter']) ? $data['CustomParameter'] : null;
|
||||||
$this->Required = !empty( $data['Required'] ) ? 1 : 0;
|
$this->Required = !empty($data['Required']) ? 1 : 0;
|
||||||
$this->CanDelete = ( isset( $data['CanDelete'] ) && !$data['CanDelete'] ) ? 0 : 1;
|
$this->CanDelete = (isset($data['CanDelete']) && !$data['CanDelete']) ? 0 : 1;
|
||||||
$this->write();
|
$this->write();
|
||||||
|
|
||||||
// The field must be written to ensure a unique ID.
|
// The field must be written to ensure a unique ID.
|
||||||
|
Loading…
Reference in New Issue
Block a user