@view_config(renderer="templates/form.pt", name="checkedpassword_readonly")
@demonstrate("Checked Password Widget (read-only)")
def checkedpassword_readonly(self):
class Schema(colander.Schema):
password = colander.SchemaNode(
colander.String(),
validator=colander.Length(min=5),
widget=deform.widget.CheckedPasswordWidget(readonly=True),
description="Type your password and confirm it",
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form, appstruct={"password": "foo"})