Fix list delegations to show field labels.

Also fix script tags on delegateform.kid.
This commit is contained in:
Kevin McCarthy 2007-10-15 14:17:51 -07:00
parent 117a78f909
commit 40930c9b11
3 changed files with 13 additions and 2 deletions

View File

@ -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")

View File

@ -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")

View File

@ -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>