def deploy_member_filters(status=False):
 T = current.T
 widgets = [S3TextFilter(['person_id$first_name', 'person_id$middle_name', 'person_id$last_name'], label=T('Name')), S3OptionsFilter('organisation_id', filter=True, hidden=True), S3OptionsFilter('credential.job_title_id', label=T('Sector'), hidden=True)]
 settings = current.deployment_settings
 if settings.get_hrm_teams():
  widgets.append(S3OptionsFilter('group_membership.group_id', label=T('Teams'), hidden=True))
 if settings.get_org_regions():
  if settings.get_org_regions_hierarchical():
   widgets.insert(1, S3HierarchyFilter('organisation_id$region_id', lookup='org_region', hidden=True, none=T('No Region')))
  else:
   widgets.insert(1, S3OptionsFilter('organisation_id$region_id', widget='multiselect', filter=True))
 if status:
  widgets.insert(1, S3OptionsFilter('application.active', cols=2, default=True, label=T('Status'), options={'True': T('active'), 'False': T('inactive')}))
 return widgets

def deploy_member_filters ( status = False ) : T = current . T widgets = [ S3TextFilter ( [ 'person_id$first_name' , 'person_id$middle_name' , 'person_id$last_name' ] , label = T ( 'Name' ) ) , S3OptionsFilter ( 'organisation_id' , filter = True , hidden = True ) , S3OptionsFilter ( 'credential.job_title_id' , label = T ( 'Sector' ) , hidden = True ) ] settings = current . deployment_settings if settings . get_hrm_teams ( ) : widgets . append ( S3OptionsFilter ( 'group_membership.group_id' , label = T ( 'Teams' ) , hidden = True ) ) if settings . get_org_regions ( ) : if settings . get_org_regions_hierarchical ( ) : widgets . insert ( 1 , S3HierarchyFilter ( 'organisation_id$region_id' , lookup = 'org_region' , hidden = True , none = T ( 'No Region' ) ) ) else : widgets . insert ( 1 , S3OptionsFilter ( 'organisation_id$region_id' , widget = 'multiselect' , filter = True ) ) if status : widgets . insert ( 1 , S3OptionsFilter ( 'application.active' , cols = 2 , default = True , label = T ( 'Status' ) , options = { 'True' : T ( 'active' ) , 'False' : T ( 'inactive' ) } ) ) return widgets
filter widgets for members .