1 ##parameters=validate=''
2 from Products
.CMFCore
.utils
import getUtilityByInterfaceName
3 from Products
.Plinn
.utils
import Message
as _
4 utool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
5 atool
= getUtilityByInterfaceName('Products.CMFCore.interfaces.IActionsTool')
7 form
= context
.REQUEST
.form
8 uuid
= traverse_subpath
[0]
10 passwordChanged
= False
13 userid
= context
.reset_password_control(uuid
=uuid
, **form
)
15 passwordChanged
= True
18 options
['uuid'] = uuid
19 options
['passwordChanged'] = passwordChanged
21 hidden_vars
= ({'name' : '__ac_name', 'value' : userid
},
22 {'name' : '__ac_password', 'value' : form
['password']},
23 {'name' : 'noAjax', 'value' : '1'})
25 buttons
= ({'name': 'login', 'value': _(' Login ')},)
28 target
= '%s/password_reset_form/%s' % (utool(), uuid
)
29 buttons
= ({'name': 'validate', 'value': _('Update Password')},)
31 options
['form'] = { 'action': target
,
32 'listButtonInfos': tuple(buttons
),
33 'listHiddenVarInfos': hidden_vars
}
36 return context
.password_reset_template(**options
)