Commit bf8280a1 authored by Christopher Petrilli's avatar Christopher Petrilli

Updated the top add list to meet XHTML better, creating a paired OPTION

tag, rather than the singleton.  Also merged in the "add text" so it makes
more sense.  Lastly, made sure that if there's only one thing to be added
that its metatype shows up in the add button.
parent e58a7763
...@@ -34,32 +34,25 @@ function toggleSelect() { ...@@ -34,32 +34,25 @@ function toggleSelect() {
<dtml-if filtered_meta_types> <dtml-if filtered_meta_types>
<table width="100%" cellspacing="0" cellpadding="0" border="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td align="left" valign="top"> <td align="left" valign="top">&nbsp;</td>
<span class="std-text">
<dtml-if "_.len(filtered_meta_types) > 1">
To add an item, select an item type:
<dtml-else>
To add an item click &quot;Add&quot;:
</dtml-if>
</span>
</td>
<td align="right" valign="top"> <td align="right" valign="top">
<div class="form-element"> <div class="form-element">
<form action="&dtml-URL1;/" method="get"> <form action="&dtml-URL1;/" method="get">
<dtml-if "_.len(filtered_meta_types) > 1"> <dtml-if "_.len(filtered_meta_types) > 1">
<select class="form-element" name=":action" <select class="form-element" name=":action"
onChange="location.href='&dtml-URL1;/'+this.options[this.selectedIndex].value" /> onChange="location.href='&dtml-URL1;/'+this.options[this.selectedIndex].value" />
<option value="manage_workspace" disabled />Select Type... <option value="manage_workspace" disabled />Select type to add...
<dtml-in filtered_meta_types mapping sort=name> <dtml-in filtered_meta_types mapping sort=name>
<option value="&dtml.url_quote-action;" />&dtml-name; <option value="&dtml.url_quote-action;">&dtml-name;</option>
</dtml-in> </dtml-in>
</select> </select>
<input class="form-element" type="submit" name="submit" value=" Add " />
<dtml-else> <dtml-else>
<dtml-in filtered_meta_types mapping sort=name> <dtml-in filtered_meta_types mapping sort=name>
<input type="hidden" name=":method" value="&dtml.url_quote-action;" /> <input type="hidden" name=":method" value="&dtml.url_quote-action;" />
<input class="form-element" type="submit" name="submit" value=" Add &dtml-name;" />
</dtml-in> </dtml-in>
</dtml-if> </dtml-if>
<input class="form-element" type="submit" name="submit" value=" Add " />
</form> </form>
</div> </div>
</td> </td>
......
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