mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-15 10:51:56 -06:00
Fix list delegations to show field labels.
Also fix script tags on delegateform.kid.
This commit is contained in:
parent
117a78f909
commit
40930c9b11
@ -41,6 +41,8 @@ aci_attrs = [
|
||||
|
||||
aci_checkbox_attrs = [(field.name, field.label) for field in aci_attrs]
|
||||
|
||||
aci_name_to_label = dict(aci_checkbox_attrs)
|
||||
|
||||
class DelegateFields():
|
||||
name = widgets.TextField(name="name", label="ACI Name")
|
||||
|
||||
|
@ -182,6 +182,13 @@ class DelegationController(IPAController):
|
||||
pass
|
||||
group_dn_to_cn = self.extract_group_cns(aci_list, client)
|
||||
|
||||
# The list page needs to display field labels, not raw
|
||||
# LDAP attributes
|
||||
for aci in aci_list:
|
||||
aci.attrs = map(lambda name:
|
||||
ipagui.forms.delegate.aci_name_to_label.get(name, name),
|
||||
aci.attrs)
|
||||
|
||||
return dict(aci_list=aci_list, group_dn_to_cn=group_dn_to_cn)
|
||||
|
||||
@expose("ipagui.templates.delegategroupsearch")
|
||||
|
@ -160,11 +160,13 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script py:if="not value.get('source_group_dn')">
|
||||
<script py:if="not value.get('source_group_dn')"
|
||||
type="text/javascript">
|
||||
new Effect.Appear($('source_searcharea'), {duration: 0.25});
|
||||
new Effect.Fade($('source_change_link'), {duration: 0.25});
|
||||
</script>
|
||||
<script py:if="not value.get('dest_group_dn')">
|
||||
<script py:if="not value.get('dest_group_dn')"
|
||||
type="text/javascript">
|
||||
new Effect.Appear($('dest_searcharea'), {duration: 0.25});
|
||||
new Effect.Fade($('dest_change_link'), {duration: 0.25});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user