Example #1
0
	def __init__(self, env):
		self.moduleName = "GeneralSearch"

		self.actions = {"searchform":	action(loadFromForm=0, editable=1, nextAction="search", nextTitle="Search >>"),
				"search":	action(queryFromForm=1, editable=0, nextModule="CustomerRecord", nextAction="view", nextLink=1) }

		self.structures = {GeneralSearchStructure: {}}
		self.rootStructure = GeneralSearchStructure
		self.data = []
		self.extraVars = []
		self.arrangement = None
		self.pageTitle = "Search"
Example #2
0
	def __init__(self, env):
		self.moduleName = 'CustomerRecord'

		self.actions = {"edit":		action(loadFromDb=1, editable=1, nextAction="update", nextTitle="Save"),
				"view":		action(loadFromDb=1, editable=0, nextAction="edit", nextTitle="Edit"),
				"verify":	action(loadFromForm=1, editable=1, nextAction="update", nextTitle="Save"),
				"update":	action(loadFromDb=1, editable=0, preFunction=self.dbSave, chainAction="view") }

		self.structures = {MasterAccount: {}, SubAccount: {}, Web: {WebRedirect: {}}, SubWeb: {}}
		self.rootStructure = MasterAccount
		self.extraVars = []
		self.arrangement = 'auto'

		self.data = []

		self.pageTitle = "Customer Record"
Example #3
0
	def __init__(self, env):
		self.moduleName = 'Generic'

		structureName = env.fieldStorage['structure']
		structureFile = __import__('structures.'+structureName)
		structureCls = eval('structureFile.'+structureName+'.'+structureName)
		structureCls.defaultFieldArrangement = 'list'

		self.actions = {"edit":		action(loadFromDb=1, editable=1, nextAction="update", nextTitle="Save"),
				"view":		action(loadFromDb=1, editable=0, nextAction="edit", nextTitle="Edit"),
				"verify":	action(loadFromForm=1, editable=1, nextAction="update", nextTitle="Save"),
				"update":	action(loadFromDb=1, editable=0, preFunction=self.dbSave, chainAction="view") }

		self.structures = {structureCls: {}}
		self.rootStructure = structureCls
		self.extraVars = ['structure', 'arrangement']

		if env.fieldStorage.has_key('arrangement'): self.arrangement =  env.fieldStorage['arrangement']
		else: self.arrangement = None

		self.data = []

		self.pageTitle = ""