On ne sait jamais ce que le hasard nous réserve :-D.
[Plinn.git] / skins / generic / password_reset_form.py
1 ##parameters=validate=''
2 from Products.CMFCore.utils import getUtilityByInterfaceName
3 utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
4 atool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IActionsTool')
5
6 form = context.REQUEST.form
7 uuid = traverse_subpath[0]
8
9 if validate and \
10 context.validatePassword(**form) and \
11 context.reset_password_control(uuid=uuid, **form) and \
12 context.setRedirect(atool, 'user/join', ajax=form.get('ajax')) :
13 return
14
15 options = {}
16 options['uuid'] = uuid
17 options['action'] = '%s/password_reset_form/%s' % (utool(), uuid)
18
19 return context.password_reset_template(**options)