Added paths for dossiers and ministries
This commit is contained in:
parent
bbf43a3ba1
commit
21457f24a4
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
tal:define="error errors/deputiesPath | nothing;
|
tal:define="error errors/deputiesPath | nothing;
|
||||||
deputiesPath python:request.get('deputies', view.settings.deputiesPath)"
|
deputiesPath python:request.get('deputiesPath', view.settings.deputiesPath)"
|
||||||
tal:attributes="class python:'field error' if error else 'field'">
|
tal:attributes="class python:'field error' if error else 'field'">
|
||||||
|
|
||||||
<label for="deputiesPath" i18n:translate="label_deputies_path">Deputies</label>
|
<label for="deputiesPath" i18n:translate="label_deputies_path">Deputies</label>
|
||||||
|
@ -51,9 +51,25 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
tal:define="error errors/ministriesPath | nothing;
|
||||||
|
ministriesPath python:request.get('ministriesPath', view.settings.ministriesPath)"
|
||||||
|
tal:attributes="class python:'field error' if error else 'field'">
|
||||||
|
|
||||||
|
<label for="ministriesPath" i18n:translate="label_ministries_path">Ministries</label>
|
||||||
|
<div tal:content="error" tal:condition="error" />
|
||||||
|
<input
|
||||||
|
name="ministriesPath"
|
||||||
|
id="ministriesPath"
|
||||||
|
type="text"
|
||||||
|
size="80"
|
||||||
|
tal:attributes="value ministriesPath"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
tal:define="error errors/documentsPath | nothing;
|
tal:define="error errors/documentsPath | nothing;
|
||||||
documentsPath python:request.get('deputies', view.settings.documentsPath)"
|
documentsPath python:request.get('documentsPath', view.settings.documentsPath)"
|
||||||
tal:attributes="class python:'field error' if error else 'field'">
|
tal:attributes="class python:'field error' if error else 'field'">
|
||||||
<label for="documentsPath" i18n:translate="label_documents_path">Documents</label>
|
<label for="documentsPath" i18n:translate="label_documents_path">Documents</label>
|
||||||
<div tal:content="error" tal:condition="error" />
|
<div tal:content="error" tal:condition="error" />
|
||||||
|
@ -67,9 +83,25 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
tal:define="error errors/dossiersPath | nothing;
|
||||||
|
dossiersPath python:request.get('dossiersPath', view.settings.dossiersPath)"
|
||||||
|
tal:attributes="class python:'field error' if error else 'field'">
|
||||||
|
<label for="dossiersPath" i18n:translate="label_dossiers_path">Dossiers</label>
|
||||||
|
<div tal:content="error" tal:condition="error" />
|
||||||
|
<input
|
||||||
|
name="dossiersPath"
|
||||||
|
id="dossiersPath"
|
||||||
|
type="text"
|
||||||
|
size="80"
|
||||||
|
tal:attributes="value dossiersPath"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
tal:define="error errors/polgroupsPath | nothing;
|
tal:define="error errors/polgroupsPath | nothing;
|
||||||
polgroupsPath python:request.get('polgroups', view.settings.polgroupsPath)"
|
polgroupsPath python:request.get('polgroupsPath', view.settings.polgroupsPath)"
|
||||||
tal:attributes="class python:'field error' if error else 'field'">
|
tal:attributes="class python:'field error' if error else 'field'">
|
||||||
|
|
||||||
<label for="polgroupsPath" i18n:translate="label_polgroups_path">Political Groups</label>
|
<label for="polgroupsPath" i18n:translate="label_polgroups_path">Political Groups</label>
|
||||||
|
|
|
@ -44,12 +44,16 @@ class TabellioControlpanel(BrowserView):
|
||||||
submitted = True
|
submitted = True
|
||||||
|
|
||||||
deputies_path = form.get('deputiesPath')
|
deputies_path = form.get('deputiesPath')
|
||||||
|
ministries_path = form.get('ministriesPath')
|
||||||
documents_path = form.get('documentsPath')
|
documents_path = form.get('documentsPath')
|
||||||
|
dossiers_path = form.get('dossiersPath')
|
||||||
polgroups_path = form.get('polgroupsPath')
|
polgroups_path = form.get('polgroupsPath')
|
||||||
|
|
||||||
if not self.errors:
|
if not self.errors:
|
||||||
self.settings.deputiesPath = deputies_path
|
self.settings.deputiesPath = deputies_path
|
||||||
|
self.settings.ministriesPath = ministries_path
|
||||||
self.settings.documentsPath = documents_path
|
self.settings.documentsPath = documents_path
|
||||||
|
self.settings.dossiersPath = dossiers_path
|
||||||
self.settings.polgroupsPath = polgroups_path
|
self.settings.polgroupsPath = polgroups_path
|
||||||
|
|
||||||
if submitted and not self.errors:
|
if submitted and not self.errors:
|
||||||
|
|
|
@ -15,6 +15,14 @@ class ITabellioSettings(Interface):
|
||||||
title=_('documents_path', 'Documents Path'),
|
title=_('documents_path', 'Documents Path'),
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
|
dossiersPath = schema.TextLine(
|
||||||
|
title=_('dossiers_path', 'Dossiers Path'),
|
||||||
|
required=False)
|
||||||
|
|
||||||
|
ministriesPath = schema.TextLine(
|
||||||
|
title=_('ministries_path', 'Ministries Path'),
|
||||||
|
required=False)
|
||||||
|
|
||||||
polgroupsPath = schema.TextLine(
|
polgroupsPath = schema.TextLine(
|
||||||
title=_('polgroups_path', 'Political Groups Path'),
|
title=_('polgroups_path', 'Political Groups Path'),
|
||||||
required=False)
|
required=False)
|
||||||
|
|
Reference in New Issue