mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Don't hard-code folder into treedropdownfield search hint
Fixes https://github.com/silverstripe/silverstripe-cms/issues/1518
This commit is contained in:
parent
f728b144ca
commit
06623537c4
@ -217,11 +217,12 @@ class TreeDropdownField extends FormField {
|
|||||||
Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
Requirements::css(FRAMEWORK_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||||
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/TreeDropdownField.css');
|
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/TreeDropdownField.css');
|
||||||
|
|
||||||
if($this->showSearch) {
|
$item = DataObject::singleton($this->sourceObject);
|
||||||
$emptyTitle = _t('DropdownField.CHOOSESEARCH', '(choose folder)', 'start value of a dropdown');
|
$emptyTitle = _t(
|
||||||
} else {
|
'DropdownField.CHOOSE_MODEL',
|
||||||
$emptyTitle = _t('DropdownField.CHOOSE', '(Choose)', 'start value of a dropdown');
|
'(Choose {name})',
|
||||||
}
|
['name' => $item->i18n_singular_name()]
|
||||||
|
);
|
||||||
|
|
||||||
$record = $this->Value() ? $this->objectForKey($this->Value()) : null;
|
$record = $this->Value() ? $this->objectForKey($this->Value()) : null;
|
||||||
if($record instanceof ViewableData) {
|
if($record instanceof ViewableData) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user