mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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 . '/client/dist/styles/TreeDropdownField.css');
|
||||
|
||||
if($this->showSearch) {
|
||||
$emptyTitle = _t('DropdownField.CHOOSESEARCH', '(choose folder)', 'start value of a dropdown');
|
||||
} else {
|
||||
$emptyTitle = _t('DropdownField.CHOOSE', '(Choose)', 'start value of a dropdown');
|
||||
}
|
||||
$item = DataObject::singleton($this->sourceObject);
|
||||
$emptyTitle = _t(
|
||||
'DropdownField.CHOOSE_MODEL',
|
||||
'(Choose {name})',
|
||||
['name' => $item->i18n_singular_name()]
|
||||
);
|
||||
|
||||
$record = $this->Value() ? $this->objectForKey($this->Value()) : null;
|
||||
if($record instanceof ViewableData) {
|
||||
|
Loading…
Reference in New Issue
Block a user