Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.2' into 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Jun 13, 2017
2 parents 27b8ef3 + fe98baf commit 728647c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getFormField()
// Set the default checked items
$defaultCheckedItems = $this->getDefaultOptions();
if ($defaultCheckedItems->count()) {
$field->setDefaultItems($defaultCheckedItems->map('EscapedTitle')->keys());
$field->setDefaultItems($defaultCheckedItems->map('Value')->keys());
}

$this->doUpdateFormField($field);
Expand Down
2 changes: 1 addition & 1 deletion code/model/editableformfields/EditableDropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getFormField()
// Set default
$defaultOption = $this->getDefaultOptions()->first();
if ($defaultOption) {
$field->setValue($defaultOption->EscapedTitle);
$field->setValue($defaultOption->Value);
}
$this->doUpdateFormField($field);
return $field;
Expand Down
6 changes: 5 additions & 1 deletion code/model/editableformfields/EditableOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ public function canDelete($member = null)
return $this->canEdit($member);
}

/**
* @deprecated 5.0 Use "$Title.XML" in templates instead
* @return string
*/
public function getEscapedTitle()
{
return Convert::raw2att($this->Title);
}

/**
/**
* @param Member $member
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion code/model/editableformfields/EditableRadioField.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getFormField()
// Set default item
$defaultOption = $this->getDefaultOptions()->first();
if ($defaultOption) {
$field->setValue($defaultOption->EscapedTitle);
$field->setValue($defaultOption->Value);
}
$this->doUpdateFormField($field);
return $field;
Expand Down

0 comments on commit 728647c

Please sign in to comment.