Added paths for dossiers and ministries

This commit is contained in:
Frédéric Péters 2011-08-11 17:23:34 +02:00
parent bbf43a3ba1
commit 21457f24a4
3 changed files with 47 additions and 3 deletions

View File

@ -37,7 +37,7 @@
<div
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'">
<label for="deputiesPath" i18n:translate="label_deputies_path">Deputies</label>
@ -51,9 +51,25 @@
/>
</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
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'">
<label for="documentsPath" i18n:translate="label_documents_path">Documents</label>
<div tal:content="error" tal:condition="error" />
@ -67,9 +83,25 @@
</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
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'">
<label for="polgroupsPath" i18n:translate="label_polgroups_path">Political Groups</label>

View File

@ -44,12 +44,16 @@ class TabellioControlpanel(BrowserView):
submitted = True
deputies_path = form.get('deputiesPath')
ministries_path = form.get('ministriesPath')
documents_path = form.get('documentsPath')
dossiers_path = form.get('dossiersPath')
polgroups_path = form.get('polgroupsPath')
if not self.errors:
self.settings.deputiesPath = deputies_path
self.settings.ministriesPath = ministries_path
self.settings.documentsPath = documents_path
self.settings.dossiersPath = dossiers_path
self.settings.polgroupsPath = polgroups_path
if submitted and not self.errors:

View File

@ -15,6 +15,14 @@ class ITabellioSettings(Interface):
title=_('documents_path', 'Documents Path'),
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(
title=_('polgroups_path', 'Political Groups Path'),
required=False)