Revert to display_name
field for person views
This commit is contained in:
parent
e4a10cf7fc
commit
369d5849a9
|
@ -83,11 +83,11 @@ class PeopleView(MasterView):
|
||||||
g.sorters['email'] = lambda q, d: q.order_by(getattr(model.PersonEmailAddress.address, d)())
|
g.sorters['email'] = lambda q, d: q.order_by(getattr(model.PersonEmailAddress.address, d)())
|
||||||
g.sorters['phone'] = lambda q, d: q.order_by(getattr(model.PersonPhoneNumber.number, d)())
|
g.sorters['phone'] = lambda q, d: q.order_by(getattr(model.PersonPhoneNumber.number, d)())
|
||||||
|
|
||||||
g.default_sortkey = 'full_name'
|
g.default_sortkey = 'display_name'
|
||||||
|
|
||||||
g.configure(
|
g.configure(
|
||||||
include=[
|
include=[
|
||||||
g.full_name,
|
g.display_name.label("Full Name"),
|
||||||
g.first_name,
|
g.first_name,
|
||||||
g.last_name,
|
g.last_name,
|
||||||
g.phone.label("Phone Number"),
|
g.phone.label("Phone Number"),
|
||||||
|
@ -108,6 +108,7 @@ class PeopleView(MasterView):
|
||||||
raise HTTPNotFound
|
raise HTTPNotFound
|
||||||
|
|
||||||
def _preconfigure_fieldset(self, fs):
|
def _preconfigure_fieldset(self, fs):
|
||||||
|
fs.display_name.set(label="Full Name")
|
||||||
fs.phone.set(label="Phone Number", readonly=True)
|
fs.phone.set(label="Phone Number", readonly=True)
|
||||||
fs.email.set(label="Email Address", readonly=True)
|
fs.email.set(label="Email Address", readonly=True)
|
||||||
fs.address.set(label="Mailing Address", readonly=True)
|
fs.address.set(label="Mailing Address", readonly=True)
|
||||||
|
@ -116,7 +117,7 @@ class PeopleView(MasterView):
|
||||||
def configure_fieldset(self, fs):
|
def configure_fieldset(self, fs):
|
||||||
fs.configure(
|
fs.configure(
|
||||||
include=[
|
include=[
|
||||||
fs.full_name,
|
fs.display_name,
|
||||||
fs.first_name,
|
fs.first_name,
|
||||||
fs.middle_name,
|
fs.middle_name,
|
||||||
fs.last_name,
|
fs.last_name,
|
||||||
|
@ -130,7 +131,7 @@ class PeopleView(MasterView):
|
||||||
class PeopleAutocomplete(AutocompleteView):
|
class PeopleAutocomplete(AutocompleteView):
|
||||||
|
|
||||||
mapped_class = model.Person
|
mapped_class = model.Person
|
||||||
fieldname = 'full_name'
|
fieldname = 'display_name'
|
||||||
|
|
||||||
|
|
||||||
class PeopleEmployeesAutocomplete(PeopleAutocomplete):
|
class PeopleEmployeesAutocomplete(PeopleAutocomplete):
|
||||||
|
|
Loading…
Reference in a new issue