diff --git a/tailbone/forms/renderers/__init__.py b/tailbone/forms/renderers/__init__.py index 12c467a0..284b4817 100644 --- a/tailbone/forms/renderers/__init__.py +++ b/tailbone/forms/renderers/__init__.py @@ -35,19 +35,13 @@ from .common import (StrippedTextFieldRenderer, CodeTextAreaFieldRenderer, Autoc from .files import FileFieldRenderer -# TODO: deprecate / remove Link renderers -from .people import (PersonFieldRenderer, PersonFieldLinkRenderer, - CustomerFieldRenderer, CustomerFieldLinkRenderer) - +from .people import PersonFieldRenderer, CustomerFieldRenderer from .users import UserFieldRenderer, PermissionsFieldRenderer - from .employees import EmployeeFieldRenderer +from .stores import StoreFieldRenderer +from .vendors import VendorFieldRenderer, PurchaseFieldRenderer from .products import (GPCFieldRenderer, DepartmentFieldRenderer, BrandFieldRenderer, ProductFieldRenderer, PriceFieldRenderer, PriceWithExpirationFieldRenderer) -from .stores import StoreFieldRenderer - -from .vendors import VendorFieldRenderer, PurchaseFieldRenderer - from .batch import BatchIDFieldRenderer, HandheldBatchFieldRenderer diff --git a/tailbone/forms/renderers/people.py b/tailbone/forms/renderers/people.py index e103b7f5..62a1ecc5 100644 --- a/tailbone/forms/renderers/people.py +++ b/tailbone/forms/renderers/people.py @@ -35,7 +35,6 @@ class PersonFieldRenderer(AutocompleteFieldRenderer): """ Renderer for :class:`rattail.db.model.Person` instance fields. """ - service_route = 'people.autocomplete' def render_readonly(self, **kwargs): @@ -44,9 +43,6 @@ class PersonFieldRenderer(AutocompleteFieldRenderer): return '' return tags.link_to(person, self.request.route_url('people.view', uuid=person.uuid)) -# TODO: deprecate / remove this -PersonFieldLinkRenderer = PersonFieldRenderer - class CustomerFieldRenderer(AutocompleteFieldRenderer): """ @@ -60,6 +56,3 @@ class CustomerFieldRenderer(AutocompleteFieldRenderer): if not customer: return '' return tags.link_to(customer, self.request.route_url('customers.view', uuid=customer.uuid)) - -# TODO: deprecate / remove this -CustomerFieldLinkRenderer = CustomerFieldRenderer diff --git a/tailbone/views/users.py b/tailbone/views/users.py index fc395c62..7d9bf200 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -156,15 +156,16 @@ class UsersView(MasterView): ], readonly=True) - def configure_fieldset(self, fs): + def _preconfigure_fieldset(self, fs): fs.username.set(renderer=forms.renderers.StrippedTextFieldRenderer, validate=unique_username) - fs.person.set(options=[]) - fs.person.set(renderer=forms.renderers.PersonFieldLinkRenderer) + fs.person.set(renderer=forms.renderers.PersonFieldRenderer, options=[]) fs.append(PasswordField('password', label="Set Password")) fs.password.attrs(autocomplete='off') fs.append(formalchemy.Field('confirm_password', renderer=PasswordFieldRenderer)) fs.confirm_password.attrs(autocomplete='off') fs.append(RolesField('roles', renderer=RolesFieldRenderer(self.request))) + + def configure_fieldset(self, fs): fs.configure( include=[ fs.username,