diff --git a/tailbone/forms/core.py b/tailbone/forms/core.py index 0413b491..2238cb06 100644 --- a/tailbone/forms/core.py +++ b/tailbone/forms/core.py @@ -340,7 +340,7 @@ class Form(object): def __init__(self, fields=None, schema=None, request=None, mobile=False, readonly=False, readonly_fields=[], model_instance=None, model_class=None, nodes={}, enums={}, labels={}, renderers=None, hidden={}, widgets={}, defaults={}, validators={}, required={}, helptext={}, focus_spec=None, - action_url=None, cancel_url=None): + action_url=None, cancel_url=None, use_buefy=None): self.fields = None if fields is not None: @@ -374,6 +374,7 @@ class Form(object): self.focus_spec = focus_spec self.action_url = action_url self.cancel_url = cancel_url + self.use_buefy = use_buefy def __contains__(self, item): return item in self.fields @@ -685,6 +686,8 @@ class Form(object): if not template: if self.readonly: template = '/forms/form_readonly.mako' + elif self.use_buefy: + template = '/forms/form_buefy.mako' else: template = '/forms/form.mako' context = kwargs diff --git a/tailbone/templates/reports/generate.mako b/tailbone/templates/reports/generate.mako index dafa3a5b..7ec901e8 100644 --- a/tailbone/templates/reports/generate.mako +++ b/tailbone/templates/reports/generate.mako @@ -16,7 +16,7 @@
${report.__doc__}
- ${form.render(template='/forms/form{}.mako'.format('_buefy' if use_buefy else ''))|n} + ${form.render()|n}