[Zope-Checkins] CVS: Zope/lib/python/OFS/dtml - add.dtml:1.1.2.1 main.dtml:1.16.52.3

Shane Hathaway shane@digicool.com
Fri, 28 Sep 2001 14:06:43 -0400


Update of /cvs-repository/Zope/lib/python/OFS/dtml
In directory cvs.zope.org:/tmp/cvs-serv8233/dtml

Modified Files:
      Tag: ComponentArchitecture-branch
	main.dtml 
Added Files:
      Tag: ComponentArchitecture-branch
	add.dtml 
Log Message:
Moved the "add" list to a different screen, leaving behind a simple button.
This was needed to support entering an ID for factories without a presentation.


=== Added File Zope/lib/python/OFS/dtml/add.dtml ===
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-let form_title="'Add an object'">
<dtml-var manage_form_title>
</dtml-let>

<form action="callFactory" method="GET">
<table cellspacing="0" cellpadding="1" border="0">
 <dtml-in getTypesByProduct>
  <tr>
   <th colspan="3" align="left">&dtml-sequence-key;</th>
  </tr>
  <dtml-in sequence-item sort=getName>
  <tr>
   <td width="10"></td>
   <td align="left" valign="top" class="form-element">
    <input type="radio" name="factory_id" value="&dtml-getId;"
     id="&dtml-getId;">
   </td>
   <td align="left" valign="top">
    <label for="&dtml-getId;">&dtml-getName;</label>
    <dtml-if getDescription>
     <font size="-1">
      <br />
      &dtml-getDescription;
     </font>
    </dtml-if>
   </td>
  </tr>
  </dtml-in>
 </dtml-in>
</table>

&nbsp; <br />

<b>Id:</b> <input type="text" name="id" value="" size="25" />
&nbsp; <input type="submit" name="submit" value=" Add " />

</form>

<dtml-var manage_page_footer>


=== Zope/lib/python/OFS/dtml/main.dtml 1.16.52.2 => 1.16.52.3 ===
 <dtml-unless rkey><dtml-call expr="REQUEST.set('rkey', '')"></dtml-unless>
 
-<!-- Add object widget -->
-<br />
-<dtml-if filtered_meta_types>
-  <table width="100%" cellspacing="0" cellpadding="0" border="0">
-  <tr>
-  <td align="left" valign="top">&nbsp;</td>
-  <td align="right" valign="top">
-  <div class="form-element">
-  <form action="&dtml-URL1;/" method="get">
-  <dtml-if "_.len(filtered_meta_types) > 1">
-    <select class="form-element" name=":action" 
-     onChange="location.href='&dtml-URL1;/'+this.options[this.selectedIndex].value">
-    <option value="manage_workspace" disabled>Select type to add...</option>
-    <dtml-in filtered_meta_types sort=getName>
-    <option value="&dtml-getAction;">&dtml-getName;</option>
-    </dtml-in>
-    </select>
-    <input class="form-element" type="submit" name="submit" value=" Add " />
-  <dtml-else>
-    <dtml-in filtered_meta_types mapping sort=name>
-    <input type="hidden" name=":method" value="&dtml-getAction;" />
-    <input class="form-element" type="submit" name="submit" value=" Add &dtml-getName;" />
-    </dtml-in>
-  </dtml-if>
-  </form>
-  </div>
-  </td>
-  </tr>
-  </table>
-</dtml-if>
-
 <form action="&dtml-URL1;/" name="objectItems" method="post">
 <dtml-if objectItems>
 <table width="100%" cellspacing="0" cellpadding="2" border="0">
@@ -172,6 +141,11 @@
   <td align="left" valign="top" width="16"></td>
   <td align="left" valign="top">
   <div class="form-element">
+  <dtml-if filtered_meta_types>
+  <input class="form-element" type="submit" 
+   name="(p)add/form:method"
+   value="Add..." />
+  </dtml-if> &nbsp;
   <dtml-unless dontAllowCopyAndPaste>
   <input class="form-element" type="submit" name="manage_renameForm:method" 
    value="Rename" />
@@ -213,18 +187,23 @@
 There are currently no items in <em>&dtml-title_or_id;</em>
 <br /><br />
 </div>
+<div class="form-element">
+<dtml-if filtered_meta_types>
+  <input class="form-element" type="submit" 
+   name="(p)add/form:method" 
+   value="Add..." />
+</dtml-if> &nbsp;
 <dtml-unless dontAllowCopyAndPaste>
 <dtml-if cb_dataValid>
-<div class="form-element">
 <input class="form-element" type="submit" name="manage_pasteObjects:method" 
  value="Paste" />
-</div>
 </dtml-if>
 </dtml-unless>
 <dtml-if "_.SecurityCheckPermission('Import/Export objects', this())">
 <input class="form-element" type="submit"
   name="manage_importExportForm:method" value="Import/Export" />
 </dtml-if>
+</div>
 </td>
 </tr>
 </table>
@@ -240,16 +219,3 @@
 </dtml-if>
 
 <dtml-var manage_page_footer>
-
-
-
-
-
-
-
-
-
-
-
-
-