Add basic Buefy form support when generating reports
apparently we have a lot of work to do yet for Buefy forms elsewhere...
This commit is contained in:
parent
4a198ce473
commit
a8db5db308
6 changed files with 147 additions and 28 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -26,6 +26,7 @@ Forms Core
|
|||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import json
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
|
@ -743,7 +744,12 @@ class Form(object):
|
|||
context['request'] = self.request
|
||||
context['readonly_fields'] = self.readonly_fields
|
||||
context['render_field_readonly'] = self.render_field_readonly
|
||||
return render('/forms/deform.mako', context)
|
||||
return render(template, context)
|
||||
|
||||
def messages_json(self, messages):
|
||||
dump = json.dumps(messages)
|
||||
dump = dump.replace("'", ''')
|
||||
return dump
|
||||
|
||||
def field_visible(self, field):
|
||||
if self.hidden and self.hidden.get(field):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue