Add edit mode for email "profile" settings.
Plus some related tweaks, needed to make that happen.
This commit is contained in:
parent
73d14cb1d9
commit
1956c4c9cf
6 changed files with 94 additions and 43 deletions
|
@ -26,7 +26,7 @@ Forms
|
|||
|
||||
from formencode import Schema
|
||||
|
||||
from .core import Form, Field, FieldSet
|
||||
from .core import Form, Field, FieldSet, GenericFieldSet
|
||||
from .simpleform import SimpleForm, FormRenderer
|
||||
from .alchemy import AlchemyForm
|
||||
from .fields import AssociationProxyField
|
||||
|
|
|
@ -30,8 +30,9 @@ from edbob.util import prettify
|
|||
|
||||
from rattail.util import OrderedDict
|
||||
|
||||
from pyramid.renderers import render
|
||||
import formalchemy
|
||||
from formalchemy.helpers import content_tag
|
||||
from pyramid.renderers import render
|
||||
|
||||
|
||||
class Form(object):
|
||||
|
@ -108,3 +109,12 @@ class FieldSet(object):
|
|||
def __init__(self):
|
||||
self.fields = OrderedDict()
|
||||
self.render_fields = self.fields
|
||||
|
||||
|
||||
class GenericFieldSet(formalchemy.FieldSet):
|
||||
"""
|
||||
FieldSet class based on FormAlchemy, but without the SQLAlchemy magic.
|
||||
"""
|
||||
__sa__ = False
|
||||
_bound_pk = None
|
||||
data = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue