settings: remove obsolete prefill/namespaces options (#42958)
This commit is contained in:
parent
2dc4fd4854
commit
9988c32906
|
@ -399,7 +399,7 @@ class ThemePreviewDirectory(Directory):
|
|||
|
||||
class SettingsDirectory(QommonSettingsDirectory):
|
||||
_q_exports = ['', 'themes', 'users',
|
||||
'template', 'misc', 'emails', 'debug_options', 'language',
|
||||
'template', 'emails', 'debug_options', 'language',
|
||||
('import', 'p_import'), 'export', 'identification', 'sitename',
|
||||
'sms', 'certificates', 'texts', 'install_theme',
|
||||
'session', 'download_theme', 'smstest', 'postgresql',
|
||||
|
@ -483,8 +483,6 @@ class SettingsDirectory(QommonSettingsDirectory):
|
|||
r += htmltext('<div class="section">')
|
||||
r += htmltext('<h2>%s</h2>') % _('Misc')
|
||||
r += htmltext('<dl>')
|
||||
r += htmltext('<dt><a href="misc">%s</a></dt> <dd>%s</dd>') % (
|
||||
_('Misc'), _('Configure misc options'))
|
||||
r += htmltext('<dt><a href="debug_options">%s</a></dt> <dd>%s</dd>') % (
|
||||
_('Debug Options'), _('Configure options useful for debugging'))
|
||||
if get_cfg('debug', {}).get('logger', True):
|
||||
|
@ -825,28 +823,6 @@ class SettingsDirectory(QommonSettingsDirectory):
|
|||
get_publisher().cfg['branding'] = branding_cfg
|
||||
get_publisher().write_cfg()
|
||||
|
||||
def misc(self):
|
||||
misc_cfg = get_cfg('misc', {})
|
||||
form = Form(enctype="multipart/form-data")
|
||||
form.add(WidgetDict, 'namespaces',
|
||||
title = _('Namespaces for prefilling'),
|
||||
value = misc_cfg.get('namespaces', {}))
|
||||
form.add_submit("submit", _("Submit"))
|
||||
form.add_submit("cancel", _("Cancel"))
|
||||
if form.get_widget('cancel').parse():
|
||||
return redirect('.')
|
||||
|
||||
if not form.is_submitted() or form.has_errors():
|
||||
get_response().breadcrumb.append(('misc', _('Misc')))
|
||||
html_top('settings', title = _('Misc'))
|
||||
r = TemplateIO(html=True)
|
||||
r += htmltext('<h2>%s</h2>') % _('Misc')
|
||||
r += form.render()
|
||||
return r.getvalue()
|
||||
else:
|
||||
cfg_submit(form, 'misc', ('namespaces',))
|
||||
return redirect('.')
|
||||
|
||||
def export(self):
|
||||
if get_request().form.get('job') or get_request().form.get('download'):
|
||||
return self.export_pending()
|
||||
|
|
Loading…
Reference in New Issue