-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommonradio.py
50 lines (39 loc) · 1.49 KB
/
commonradio.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
###########################################################################
# Copyright (C) 2008 by kosh
#
# Copyright: See COPYING file that comes with this distribution
#
###########################################################################
from userobject import UserObject
#For Security control and init
from AccessControl import ClassSecurityInfo
import Globals
class CommonRadio(UserObject):
"CommonRadio class"
security = ClassSecurityInfo()
meta_type = "CommonRadio"
data = 0
security.declareProtected('View', 'view')
def view(self):
"Render page"
return self.data
security.declareProtected("Access contents information", "checked")
def checked(self):
"return 1/0 based on the item being checked or not"
return self.data
security.declarePrivate('PrincipiaSearchSource')
def PrincipiaSearchSource(self):
"This is the basic search function"
return ""
security.declareProtected('Change CompoundDoc','setYes')
def setYes(self):
"set the radio to true"
self.setObject('data', 1)
security.declareProtected('Change CompoundDoc','setNo')
def setNo(self):
"set the radio to true"
self.setObject('data', 0)
security.declareProtected('Change CompoundDoc','clear')
clear = setNo
Globals.InitializeClass(CommonRadio)