summaryrefslogtreecommitdiffstats
path: root/tabellio
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2012-04-23 08:41:31 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2012-04-23 08:41:31 (GMT)
commit9c68343e03669bfadcbede863e0c77531301892c (patch)
tree7b13900907c2a269c4da7cd46e24a1bfec396b59 /tabellio
parent5df62bb57e80161c3c945a49b49715562a19dd15 (diff)
downloadtabellio.config-master.zip
tabellio.config-master.tar.gz
tabellio.config-master.tar.bz2
add a path for convocationsHEADmaster
Diffstat (limited to 'tabellio')
-rw-r--r--tabellio/config/controlpanel.pt17
-rw-r--r--tabellio/config/controlpanel.py2
-rw-r--r--tabellio/config/interfaces.py4
-rw-r--r--tabellio/config/utils.py3
4 files changed, 26 insertions, 0 deletions
diff --git a/tabellio/config/controlpanel.pt b/tabellio/config/controlpanel.pt
index 9cebfa6..e4acfd9 100644
--- a/tabellio/config/controlpanel.pt
+++ b/tabellio/config/controlpanel.pt
@@ -196,6 +196,23 @@
/>
</div>
+ <div
+ tal:define="error errors/convocationsPath | nothing;
+ convocationsPath python:request.get('convocationsPath', view.settings.convocationsPath)"
+ tal:attributes="class python:'field error' if error else 'field'">
+ <label for="convocationsPath" i18n:translate="label_convocations_path">Convocations</label>
+ <div tal:content="error" tal:condition="error" />
+ <input
+ name="convocationsPath"
+ id="convocationsPath"
+ type="text"
+ size="80"
+ tal:attributes="value convocationsPath"
+ />
+
+ </div>
+
+
<div class="formControls">
<input
type="submit"
diff --git a/tabellio/config/controlpanel.py b/tabellio/config/controlpanel.py
index 89a6d1d..286821b 100644
--- a/tabellio/config/controlpanel.py
+++ b/tabellio/config/controlpanel.py
@@ -47,6 +47,7 @@ class TabellioControlpanel(BrowserView):
persons_path = form.get('personsPath')
ministries_path = form.get('ministriesPath')
documents_path = form.get('documentsPath')
+ convocations_path = form.get('convocationsPath')
dossiers_path = form.get('dossiersPath')
questions_path = form.get('questionsPath')
polgroups_path = form.get('polgroupsPath')
@@ -59,6 +60,7 @@ class TabellioControlpanel(BrowserView):
self.settings.personsPath = persons_path
self.settings.ministriesPath = ministries_path
self.settings.documentsPath = documents_path
+ self.settings.convocationsPath = convocations_path
self.settings.dossiersPath = dossiers_path
self.settings.questionsPath = questions_path
self.settings.polgroupsPath = polgroups_path
diff --git a/tabellio/config/interfaces.py b/tabellio/config/interfaces.py
index 1cee891..cfe12be 100644
--- a/tabellio/config/interfaces.py
+++ b/tabellio/config/interfaces.py
@@ -15,6 +15,10 @@ class ITabellioSettings(Interface):
title=_('deputies_path', 'Deputies Path'),
required=False)
+ convocationsPath = schema.TextLine(
+ title=_('convocations_path', 'Convocations Path'),
+ required=False)
+
documentsPath = schema.TextLine(
title=_('documents_path', 'Documents Path'),
required=False)
diff --git a/tabellio/config/utils.py b/tabellio/config/utils.py
index f7e59fe..edc988b 100644
--- a/tabellio/config/utils.py
+++ b/tabellio/config/utils.py
@@ -16,6 +16,9 @@ def get_questions_path():
def get_documents_path():
return component.getUtility(IRegistry).forInterface(ITabellioSettings, False).documentsPath
+def get_convocations_path():
+ return component.getUtility(IRegistry).forInterface(ITabellioSettings, False).convocationsPath
+
def get_deputies_path():
return component.getUtility(IRegistry).forInterface(ITabellioSettings, False).deputiesPath