From 43cb0f4a8630fa513e4121a221fc2215dd2f750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 15 Nov 2011 15:47:21 +0100 Subject: [PATCH] add settings for ical access --- tabellio/config/controlpanel.pt | 63 +++++++++++++++++++++++++++++++-- tabellio/config/controlpanel.py | 6 ++++ tabellio/config/interfaces.py | 9 +++++ 3 files changed, 76 insertions(+), 2 deletions(-) diff --git a/tabellio/config/controlpanel.pt b/tabellio/config/controlpanel.pt index bd5027e..ccdd799 100644 --- a/tabellio/config/controlpanel.pt +++ b/tabellio/config/controlpanel.pt @@ -314,10 +314,69 @@ + +
Misc settings
+
+ +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + + +
+ + + + +
- -
Greffier settings
diff --git a/tabellio/config/controlpanel.py b/tabellio/config/controlpanel.py index 0c76996..1f6a880 100644 --- a/tabellio/config/controlpanel.py +++ b/tabellio/config/controlpanel.py @@ -86,6 +86,12 @@ class TabellioControlpanel(BrowserView): self.settings.greffier_phone = form.get('greffier_phone') self.settings.greffier_fax = form.get('greffier_fax') + if 'form.button.MiscSave' in form: + self.authorize() + submitted = True + self.settings.ical_username = form.get('ical_username') + self.settings.ical_password = form.get('ical_password') + if submitted and not self.errors: self._setup() IStatusMessage(self.request).add(_(u"Changes saved")) diff --git a/tabellio/config/interfaces.py b/tabellio/config/interfaces.py index 958afea..47b9b05 100644 --- a/tabellio/config/interfaces.py +++ b/tabellio/config/interfaces.py @@ -61,3 +61,12 @@ class ITabellioSettings(Interface): greffier_address_line2 = schema.Text(title=_(u'Greffier Address Line 2'), required=False) greffier_phone = schema.Text(title=_(u'Greffier Phone'), required=False) greffier_fax = schema.Text(title=_(u'Greffier Fax'), required=False) + + ical_username = schema.TextLine( + title=_('ical_username', 'ICal Username'), + required=False) + + ical_password = schema.TextLine( + title=_('ical_password', 'ICal Password'), + required=False) +