mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-21 17:04:21 +01:00
disable autofill for modify forms
This commit is contained in:
parent
6dd81f5a91
commit
04c294e038
@ -840,7 +840,7 @@ class LdapCherry(object):
|
||||
for r in self.roles.flatten:
|
||||
display_names[r] = self.roles.flatten[r]['display_name']
|
||||
roles_js = json.dumps(display_names, separators=(',',':'))
|
||||
form = self.temp_form.render(attributes=self.attributes.attributes, values=None, modify=False)
|
||||
form = self.temp_form.render(attributes=self.attributes.attributes, values=None, modify=False, autofill=True)
|
||||
roles = self.temp_roles.render(roles=self.roles.flatten, graph=self.roles.graph, graph_js=graph_js, roles_js=roles_js, current_roles=None)
|
||||
return self.temp_adduser.render(form=form, roles=roles, is_admin=is_admin, notification=notification)
|
||||
|
||||
@ -883,7 +883,7 @@ class LdapCherry(object):
|
||||
user_lonely_groups = tmp['unusedgroups']
|
||||
roles_js = json.dumps(display_names, separators=(',',':'))
|
||||
key = self.attributes.get_key()
|
||||
form = self.temp_form.render(attributes=self.attributes.attributes, values=user_attrs, modify=True, keyattr=key)
|
||||
form = self.temp_form.render(attributes=self.attributes.attributes, values=user_attrs, modify=True, keyattr=key, autofill=False)
|
||||
roles = self.temp_roles.render(roles=self.roles.flatten, graph=self.roles.graph, graph_js=graph_js, roles_js=roles_js, current_roles=user_roles)
|
||||
return self.temp_modify.render(form=form, roles=roles, is_admin=is_admin, notification=notification, standalone_groups=user_lonely_groups)
|
||||
|
||||
@ -903,5 +903,5 @@ class LdapCherry(object):
|
||||
params = self._parse_params(params)
|
||||
self._selfmodify(params)
|
||||
user_attrs = self._get_user(user)
|
||||
form = self.temp_form.render(attributes=self.attributes.get_selfattributes(), values=user_attrs, modify=True)
|
||||
form = self.temp_form.render(attributes=self.attributes.get_selfattributes(), values=user_attrs, modify=True, autofill=False)
|
||||
return self.temp_selfmodify.render(form=form, is_admin=is_admin)
|
||||
|
@ -74,6 +74,7 @@ ${form_col(lc1)}
|
||||
${form_col(lc2)}
|
||||
</div>
|
||||
</div>
|
||||
% if autofill:
|
||||
<%
|
||||
from sets import Set
|
||||
attr_set = Set([])
|
||||
@ -118,3 +119,4 @@ if (fields['${attrid}'] != null) {
|
||||
};
|
||||
% endfor
|
||||
</script>
|
||||
% endif
|
||||
|
Loading…
Reference in New Issue
Block a user