admin: don't present signing option if M2Crypto is not available
This commit is contained in:
parent
23c7018894
commit
593ce6668b
|
@ -22,6 +22,11 @@ except ImportError:
|
|||
except ImportError:
|
||||
ET = None
|
||||
|
||||
try:
|
||||
import M2Crypto
|
||||
except ImportError:
|
||||
M2Crypto = None
|
||||
|
||||
import tarfile
|
||||
import time
|
||||
from cStringIO import StringIO
|
||||
|
@ -537,7 +542,8 @@ class FormDefPage(Directory):
|
|||
form = Form(enctype='multipart/form-data')
|
||||
form.add(CheckboxWidget, 'confirmation', title=_('Include confirmation page'),
|
||||
value=self.formdef.confirmation)
|
||||
form.add(SingleSelectWidget, 'signing', title=_('Signature'),
|
||||
if M2Crypto:
|
||||
form.add(SingleSelectWidget, 'signing', title=_('Signature'),
|
||||
value=self.formdef.signing,
|
||||
options = [
|
||||
(None, _('None')),
|
||||
|
|
Loading…
Reference in New Issue