Prevent edit for CORE Employee birth date
easiest hack for now, really should add a date+time widget at some point
This commit is contained in:
parent
5674ad8e8d
commit
338cdd578a
|
@ -59,8 +59,6 @@ class EmployeeView(CoreOfficeMasterView):
|
||||||
g.filters['last_name'].default_active = True
|
g.filters['last_name'].default_active = True
|
||||||
g.filters['last_name'].default_verb = 'contains'
|
g.filters['last_name'].default_verb = 'contains'
|
||||||
|
|
||||||
g.set_type('birth_date', 'datetime_local')
|
|
||||||
|
|
||||||
g.set_sort_defaults('number')
|
g.set_sort_defaults('number')
|
||||||
|
|
||||||
g.set_link('number')
|
g.set_link('number')
|
||||||
|
@ -73,7 +71,9 @@ class EmployeeView(CoreOfficeMasterView):
|
||||||
|
|
||||||
def configure_form(self, f):
|
def configure_form(self, f):
|
||||||
super(EmployeeView, self).configure_form(f)
|
super(EmployeeView, self).configure_form(f)
|
||||||
f.set_type('birth_date', 'datetime_local')
|
|
||||||
|
# TODO: should expose this as date+time widget?
|
||||||
|
f.set_readonly('birth_date')
|
||||||
|
|
||||||
def core_office_object_url(self, office_url, employee):
|
def core_office_object_url(self, office_url, employee):
|
||||||
return '{}/admin/Cashiers/CashierEditor.php?emp_no={}'.format(
|
return '{}/admin/Cashiers/CashierEditor.php?emp_no={}'.format(
|
||||||
|
|
Loading…
Reference in a new issue