summaryrefslogtreecommitdiffstats
path: root/idp/extra/modules/identities_ui.ptl
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@0d.be>2008-01-17 14:20:18 (GMT)
committerFrederic Peters <fpeters@0d.be>2008-01-17 14:20:18 (GMT)
commit1079fb12917f13f739d75439e1b244e20de39ec2 (patch)
treebe5914e5650e13da34e1575cd5fb203befbe7fac /idp/extra/modules/identities_ui.ptl
parent29b27c3f87b14ec08db091496e06987de15894a5 (diff)
downloadpratic-1079fb12917f13f739d75439e1b244e20de39ec2.zip
pratic-1079fb12917f13f739d75439e1b244e20de39ec2.tar.gz
pratic-1079fb12917f13f739d75439e1b244e20de39ec2.tar.bz2
possibility to change password of agents
Diffstat (limited to 'idp/extra/modules/identities_ui.ptl')
-rw-r--r--idp/extra/modules/identities_ui.ptl20
1 files changed, 19 insertions, 1 deletions
diff --git a/idp/extra/modules/identities_ui.ptl b/idp/extra/modules/identities_ui.ptl
index 92b5c3e..6728550 100644
--- a/idp/extra/modules/identities_ui.ptl
+++ b/idp/extra/modules/identities_ui.ptl
@@ -100,7 +100,6 @@ class AgentDirectory(Directory):
self.agent.save(['cdg59isDisabled'])
return redirect('.')
-
def delete [html] (self):
form = Form(enctype='multipart/form-data')
form.widgets.append(HtmlWidget('<p>%s</p>' % _(
@@ -117,6 +116,25 @@ class AgentDirectory(Directory):
else:
return redirect('..')
+ def password [html] (self):
+
+ form = Form(enctype='multipart/form-data')
+ form.add(PasswordWidget, 'new_password', title=_('New Password'), required=True)
+
+ form.add_submit('submit', _('Submit'))
+ form.add_submit('cancel', _('Cancel'))
+
+ if form.get_submit() == 'cancel':
+ return redirect('.')
+
+ if not form.is_submitted() or form.has_errors():
+ get_response().breadcrumb.append(('password', _('Change Password')))
+ html_top('identities', title = _('Agent: %s') % self.agent.cn)
+ '<h2>%s</h2>' % self.agent.cn
+ form.render()
+ else:
+ self.agent.change_password(str(form.get_widget('new_password').parse()))
+ return redirect('..')
class IdentitiesDirectory(Directory):