Commit cf20463d authored by Amos Latteier's avatar Amos Latteier

Changed the user interface for the ZClass Factory and add method wizard. I...

Changed the user interface for the ZClass Factory and add method wizard. I think it is much clearer now.
parent e0064795
......@@ -99,10 +99,11 @@ class PersistentClass(Base):
def __class_init__(self): pass
manage_addZClassForm=Globals.HTMLFile(
'addZClass', globals(), default_class_='OFS.SimpleItem Item')
'addZClass', globals(), default_class_='OFS.SimpleItem Item',
CreateFactory=1)
def manage_addZClass(self, id, title='', baseclasses=[],
meta_type='', REQUEST=None):
meta_type='', CreateFactory=1, REQUEST=None):
"""Add a Z Class
"""
bases=[]
......@@ -116,7 +117,7 @@ def manage_addZClass(self, id, title='', baseclasses=[],
if meta_type: Z._zclass_.meta_type=meta_type
self._setObject(id, Z)
if meta_type:
if CreateFactory and meta_type:
self.manage_addDTMLMethod(
id+'_addForm',
id+' constructor input form',
......
......@@ -40,25 +40,21 @@
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">
<EM>Add list text<sup>1</sup></EM></TH>
Meta type</TH>
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3">
<INPUT TYPE="TEXT" NAME="meta_type" SIZE="40"
VALUE="<!--#var meta_type-->">
</TD>
</TR>
<tr><td></td><td colspan=3>
<EM><font size=-1><sup>1</sup>
If you specify a value, a creation interface will be created
automatically. Two DTML Methods, an input form, and a creation
method will be created. The creation method will be the action of
the input form. A factory object will also be created to
register the new ZClass in add lists. All of the new objects will
have <em>id<em>s beginning with the <strong>Id</strong>
specified above.
<TR>
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2">
<INPUT TYPE="CHECKBOX" NAME="CreateFactory:int" VALUE="1"
<!--#if CreateFactory-->CHECKED<!--#/if-->>
<STRONG>Create Factory and add methods.</STRONG>
</TD>
</TR>
</font></EM>
</td></tr>
<tr>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Base classes</TH>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment