0001-manager-do-not-show-internal-_a2-roles-by-default-14.patch
src/authentic2/manager/forms.py | ||
---|---|---|
273 | 273 |
text = forms.CharField( |
274 | 274 |
label=_('Name'), |
275 | 275 |
required=False) |
276 |
internals = forms.BooleanField( |
|
277 |
initial=False, |
|
278 |
label=_('Show internal roles'), |
|
279 |
required=False) |
|
276 | 280 | |
277 | 281 |
def filter(self, qs): |
278 | 282 |
if self.cleaned_data.get('text'): |
279 | 283 |
qs = qs.filter(name__icontains=self.cleaned_data['text']) |
284 |
if not self.cleaned_data.get('internals'): |
|
285 |
qs = qs.exclude(slug__startswith='_a2') |
|
280 | 286 |
return qs |
281 | 287 | |
282 | 288 |
src/authentic2/manager/static/authentic2/manager/css/style.css | ||
---|---|---|
14 | 14 |
margin-bottom: 2em; |
15 | 15 |
} |
16 | 16 | |
17 |
#sidebar label { |
|
18 |
display: inline; |
|
19 |
} |
|
20 | ||
17 | 21 |
#sidebar input, |
18 | 22 |
#sidebar select, |
19 | 23 |
#sidebar button { |
20 | 24 |
width: 100%; |
21 | 25 |
} |
22 | 26 | |
27 |
#sidebar input[type="checkbox"] { |
|
28 |
width: auto; |
|
29 |
} |
|
30 | ||
23 | 31 |
#sidebar ul.roles { |
24 | 32 |
padding: 0; |
25 | 33 |
text-align: left; |
26 |
- |