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
):]
8 gtool
= context
.portal_groups
9 gtool
.addGroup(groupname
, **context
.REQUEST
.form
)
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
)))