diff options
| author | bwarsaw | 2002-02-27 00:09:04 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-02-27 00:09:04 +0000 |
| commit | 2e501d081dccf145c3a039a832354a4c3034ba48 (patch) | |
| tree | 3c12fa084643ee1c6f2cad59b8d2e05e58def821 /Mailman/Gui/Privacy.py | |
| parent | 797a7934e95b74a858bc04be20a7064741420f80 (diff) | |
| download | mailman-2e501d081dccf145c3a039a832354a4c3034ba48.tar.gz mailman-2e501d081dccf145c3a039a832354a4c3034ba48.tar.zst mailman-2e501d081dccf145c3a039a832354a4c3034ba48.zip | |
Use GUIBase as the base class.
_setValue(): New overridden method which handles the special case when
ALLOW_OPEN_SUBSCRIBE is set.
Diffstat (limited to 'Mailman/Gui/Privacy.py')
| -rw-r--r-- | Mailman/Gui/Privacy.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Mailman/Gui/Privacy.py b/Mailman/Gui/Privacy.py index 8167b8724..fa066ac90 100644 --- a/Mailman/Gui/Privacy.py +++ b/Mailman/Gui/Privacy.py @@ -19,10 +19,11 @@ from Mailman import mm_cfg from Mailman.i18n import _ +from Mailman.Gui.GUIBase import GUIBase -class Privacy: +class Privacy(GUIBase): def GetConfigCategory(self): return 'privacy', _('Privacy options') @@ -384,3 +385,11 @@ class Privacy: return spam_rtn else: return subscribing_rtn + + def _setValue(self, mlist, property, val, doc): + # For subscribe_policy when ALLOW_OPEN_SUBSCRIBE is true, we need to + # add one to the value because the page didn't present an open list as + # an option. + if property == 'subscribe_policy' and not mm_cfg.ALLOW_OPEN_SUBSCRIBE: + val += 1 + setattr(mlist, property, val) |
