Skip to content
Permalink
Browse files

BUG Don't hard-code folder into treedropdownfield search hint

  • Loading branch information
Damian Mooyman
Damian Mooyman committed Jun 30, 2016
1 parent f728b14 commit 06623537c48c9d317aa647bf4021c4d846375fb9
Showing with 6 additions and 5 deletions.
  1. +6 −5 forms/TreeDropdownField.php
@@ -217,11 +217,12 @@ public function Field($properties = array()) {
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) {

0 comments on commit 0662353

Please sign in to comment.
You can’t perform that action at this time.