mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
BUGFIX: autocomplete field should works on all config sub_item of a SecurityAdmin (merged from branches/2.3-nzct)
MINOR: the autocomplete field AjaxMemberLookup? should be only applied to the defined input field with has "text" class. This is for performance imporovement (merged from branches/2.3-nzct) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@82092 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
901c49c328
commit
5d4ae0dde1
@ -94,7 +94,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
$result = '';
|
||||
|
||||
// Make sure we only autocomplete on keys that actually exist, and that we don't autocomplete on password
|
||||
if(!array_key_exists($fieldName, singleton($this->stat('subitem_class'))->stat('db')) || $fieldName == 'Password') return;
|
||||
if(!singleton($this->stat('subitem_class'))->hasDatabaseField($fieldName) || $fieldName == 'Password') return;
|
||||
|
||||
$matches = DataObject::get($this->stat('subitem_class'),"\"$fieldName\" LIKE '" . Convert::raw2sql($fieldVal) . "%'");
|
||||
if($matches) {
|
||||
|
@ -275,5 +275,5 @@ MemberFilterButton.prototype = {
|
||||
|
||||
// has to be external from initialize() because otherwise request will double on each reload - WTF
|
||||
Behaviour.register({
|
||||
'#Form_EditForm div.MemberTableField table.data input' : AjaxMemberLookup
|
||||
'#Form_EditForm div.MemberTableField table.data input.text' : AjaxMemberLookup
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user