diff --git a/tailbone/templates/change_password.mako b/tailbone/templates/change_password.mako
index 52cd55fd..c64acebf 100644
--- a/tailbone/templates/change_password.mako
+++ b/tailbone/templates/change_password.mako
@@ -1,13 +1,7 @@
## -*- coding: utf-8; -*-
-<%inherit file="/page.mako" />
+<%inherit file="/form.mako" />
<%def name="title()">Change Password%def>
-<%def name="page_content()">
-
- ${form.render_deform()|n}
-
-%def>
-
${parent.body()}
diff --git a/tailbone/views/auth.py b/tailbone/views/auth.py
index d95ee9a5..2dd37e2c 100644
--- a/tailbone/views/auth.py
+++ b/tailbone/views/auth.py
@@ -172,18 +172,15 @@ class AuthenticationView(View):
if not self.request.user:
return self.redirect(self.request.route_url('home'))
- if self.rattail_config.demo() and self.request.user.username == 'chuck':
- self.request.session.flash("Cannot change password for 'chuck' in demo mode", 'error')
- return self.redirect(self.request.get_referrer())
-
+ use_buefy = self.get_use_buefy()
schema = ChangePassword().bind(user=self.request.user)
- form = forms.Form(schema=schema, request=self.request)
+ form = forms.Form(schema=schema, request=self.request, use_buefy=use_buefy)
if form.validate(newstyle=True):
set_user_password(self.request.user, form.validated['new_password'])
self.request.session.flash("Your password has been changed.")
return self.redirect(self.request.get_referrer())
- return {'form': form}
+ return {'form': form, 'use_buefy': use_buefy}
def become_root(self):
"""