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
|
# -*- coding: iso-8859-1 -*-
"""
ATSchemaEditorNG
(C) 2003,2004, Andreas Jung, ZOPYX Software Development and Consulting
and Contributors
D-72070 Tbingen, Germany
Contact: andreas@andreas-jung.com
License: see LICENSE.txt
$Id: SchemaEditorTool.py 977 2004-12-28 10:50:15Z ajung $
"""
from Globals import DTMLFile, InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo
from OFS.SimpleItem import SimpleItem
from SchemaEditor import SchemaEditor
from config import TOOL_NAME
class SchemaEditorTool(SimpleItem, SchemaEditor):
""" SchemaEditorTool"""
meta_type = 'ATSchemaEditorTool'
id = TOOL_NAME
security = ClassSecurityInfo()
def manage_afterAdd(self, item, container):
self._clear() # SchemaEditor._clear()
InitializeClass(SchemaEditorTool)
manage_addSchemaEditorToolForm = DTMLFile('dtml/addSchemaEditorTool', globals())
def manage_addSchemaEditorTool(self, RESPONSE=None):
"""Add a new SchemaEditorTool """
tool = SchemaEditorTool()
self._setObject(TOOL_NAME, tool)
tool = self._getOb(TOOL_NAME)
tool = tool.__of__(self)
if RESPONSE:
RESPONSE.redirect(self.absolute_url() + '/manage_main')
|