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): ...@@ -99,10 +99,11 @@ class PersistentClass(Base):
def __class_init__(self): pass def __class_init__(self): pass
manage_addZClassForm=Globals.HTMLFile( 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=[], def manage_addZClass(self, id, title='', baseclasses=[],
meta_type='', REQUEST=None): meta_type='', CreateFactory=1, REQUEST=None):
"""Add a Z Class """Add a Z Class
""" """
bases=[] bases=[]
...@@ -116,7 +117,7 @@ def manage_addZClass(self, id, title='', baseclasses=[], ...@@ -116,7 +117,7 @@ def manage_addZClass(self, id, title='', baseclasses=[],
if meta_type: Z._zclass_.meta_type=meta_type if meta_type: Z._zclass_.meta_type=meta_type
self._setObject(id, Z) self._setObject(id, Z)
if meta_type: if CreateFactory and meta_type:
self.manage_addDTMLMethod( self.manage_addDTMLMethod(
id+'_addForm', id+'_addForm',
id+' constructor input form', id+' constructor input form',
......
...@@ -40,25 +40,21 @@ ...@@ -40,25 +40,21 @@
<TR> <TR>
<TH ALIGN="LEFT" VALIGN="TOP"> <TH ALIGN="LEFT" VALIGN="TOP">
<EM>Add list text<sup>1</sup></EM></TH> Meta type</TH>
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3"> <TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3">
<INPUT TYPE="TEXT" NAME="meta_type" SIZE="40" <INPUT TYPE="TEXT" NAME="meta_type" SIZE="40"
VALUE="<!--#var meta_type-->"> VALUE="<!--#var meta_type-->">
</TD> </TD>
</TR> </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 <TR>
automatically. Two DTML Methods, an input form, and a creation <TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="2">
method will be created. The creation method will be the action of <INPUT TYPE="CHECKBOX" NAME="CreateFactory:int" VALUE="1"
the input form. A factory object will also be created to <!--#if CreateFactory-->CHECKED<!--#/if-->>
register the new ZClass in add lists. All of the new objects will <STRONG>Create Factory and add methods.</STRONG>
have <em>id<em>s beginning with the <strong>Id</strong> </TD>
specified above. </TR>
</font></EM>
</td></tr>
<tr> <tr>
<TR> <TR>
<TH ALIGN="LEFT" VALIGN="TOP">Base classes</TH> <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