Ajout extension .cur.
[Plinn.git] / skins / control / add_group.py
1 ##parameters=groupname, ajax=''
2 from Products.Plinn.utils import desacc
3 groupname = desacc(groupname).replace(' ', '-')
4 gp = context.acl_users.getGroupPrefix()
5 while groupname.startswith(gp) :
6 groupname = groupname[len(gp):]
7
8 gtool = context.portal_groups
9 gtool.addGroup(groupname, **context.REQUEST.form)
10
11 from ZTUtils import make_query as mq
12 url = context.portal_url()
13 return context.REQUEST.RESPONSE.redirect('%s/portal_all_groups?%s' % (url, mq(portal_status_message = 'Group created.', ajax=ajax)))