From: David G. <svn...@pl...> - 2012-10-31 17:12:59
|
Repository: plone.app.controlpanel Branch: refs/heads/2.2 Date: 2012-10-31T10:12:46-07:00 Author: David Glick (davisagli) <dg...@gm...> Commit: https://github.com/plone/plone.app.controlpanel/commit/c9a14810ecf4078b750f318a5b5ef49e1c85758e Merge pull request #9 from maartenkling/2.2 clear searchstring when selecting showall in user and group search Files changed: M CHANGES.txt M plone/app/controlpanel/usergroups.py diff --git a/CHANGES.txt b/CHANGES.txt index 12960a4..bab6792 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Changelog 2.2.10 (unreleased) ------------------- +- When browsing users and groups, clear searchstring when selecting show all + [maartenkling] + - Fix 'Redirect immediately to link target' setting doesn't stick #12892 [maartenkling] diff --git a/plone/app/controlpanel/usergroups.py b/plone/app/controlpanel/usergroups.py index 289dc9c..2cbac7d 100644 --- a/plone/app/controlpanel/usergroups.py +++ b/plone/app/controlpanel/usergroups.py @@ -186,6 +186,8 @@ def __call__(self): if search or findAll: self.newSearch = True + if findAll: + form['searchstring'] = '' if submitted: if form.get('form.button.Modify', None) is not None: @@ -515,6 +517,8 @@ def __call__(self): if search or findAll: self.newSearch = True + if findAll: + form['searchstring'] = '' if submitted: if form.get('form.button.Modify', None) is not None: @@ -677,6 +681,8 @@ def update(self): search = form.get('form.button.Search', None) is not None findAll = form.get('form.button.FindAll', None) is not None and not self.many_users + if findAll: + form['searchstring'] = '' self.searchString = not findAll and form.get('searchstring', '') or '' if not(self.many_users) or bool(self.searchString): self.searchResults = self.getPotentialMembers(self.searchString) |