mobile: only display formdefs marked with the 'mobile' keyword (#7121)
This commit is contained in:
parent
553c0def5c
commit
c8c673e8ef
|
@ -933,6 +933,11 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
|
||||
all_formdefs = FormDef.select(lambda x: not x.is_disabled() or x.disabled_redirection,
|
||||
order_by = 'name')
|
||||
if get_response().page_template_key == 'mobile':
|
||||
# if we are in 'mobile' mode, and some formdefs have a 'mobile'
|
||||
# keyword, we limit the display to those
|
||||
if any((x for x in all_formdefs if x.keywords and 'mobile' in x.keywords)):
|
||||
all_formdefs = [x for x in all_formdefs if x.keywords and 'mobile' in x.keywords]
|
||||
|
||||
if position:
|
||||
t = self.display_list_of_formdefs(
|
||||
|
|
Reference in New Issue