FIX: update DropdownField usage for 3.1

This commit is contained in:
Will Rossiter 2013-03-21 23:22:51 +13:00
parent b445a308ed
commit b096cf611a

View File

@ -44,14 +44,11 @@ class UserFormsGridFieldFilterHeader extends GridFieldFilterHeader {
// show dropdown of all the fields available from the submitted form fields
// that have been saved. Takes the titles from the currently live form.
$columnField = new DropdownField(
'FieldNameFilter',
'',
$formFields->toArray(),
$selectedField,
null,
_t('UserFormsGridFieldFilterHeader.FILTERSUBMISSIONS', 'Filter Submissions..')
);
$columnField = new DropdownField('FieldNameFilter', '');
$columnField->setSource($formFields->toArray());
$columnField->setEmptyString(_t('UserFormsGridFieldFilterHeader.FILTERSUBMISSIONS', 'Filter Submissions..'));
$columnField->setHasEmptyDefault(true);
$columnField->setValue($selectedField);
$valueField = new TextField('FieldValue', '', $selectedValue);