<dtml-let form_title="'Actions'">
<dtml-if manage_page_header>
 <dtml-var manage_page_header>
<dtml-else>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html lang="en">
 <head>
 <title>&dtml-form_title;</title>
 </head>
 <body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
 <h3>&dtml-form_title;</h3>
</dtml-if>
</dtml-let>
<dtml-var manage_tabs>

<form action="&dtml-absolute_url;" method="post">

<dtml-if actions>
<table>
<dtml-in actions mapping>
<dtml-let index=sequence-index>
<tr>
<td>
  <div class="form-element">
  <input type="checkbox" name="selections:list" value="&dtml-index;" />
  </div>
</td>
<td>
  <div class="form-label">
  Name
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="name_&dtml-index;" value="&dtml-name;" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Id
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="id_&dtml-index;" value="&dtml-id;" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Action
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="action_&dtml-index;" value="&dtml-action;" size="80" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Condition 
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="condition_&dtml-index;" value="&dtml-condition;" size="80"/>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Permission
  </div>
</td>
<td>
  <div class="form-element">
  <select name="permission_&dtml-index;">
    <dtml-let selected="(not permission) and 'selected' or ' '">
      <option value="" &dtml-selected;>(none)</option>
    </dtml-let>
    <dtml-in possible_permissions sort>
      <dtml-let selected="(permission == _['sequence-item'])
        and 'selected' or ' '">
      <option value="&dtml-sequence-item;" &dtml-selected;>&dtml-sequence-item;</option>
      </dtml-let>
    </dtml-in>
  </select>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Category
  </div>
</td>
<td>
  <div class="form-element">
  <select name="category_&dtml-index;">
    <dtml-in getGroups>
       <option value=<dtml-var "_['sequence-item']['id']"> <dtml-if "_['sequence-item']['id'] == category"> selected </dtml-if>> <dtml-var "_['sequence-item']['title']"> </option>
    </dtml-in>
  </select>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  AppId
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="appId_&dtml-index;" value="<dtml-var appId missing>" size="80"/>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Description
  </div>
</td>
<td>
  <div class="form-element">
<textarea type="text" name="description_&dtml-index;"  cols="80" rows=5/>
<dtml-var description missing>
</textarea>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Icon Expression
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="icon_expr_&dtml-index;" value="&dtml-icon_expr;" size="80" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Visible?
  </div>
</td>
<td>
  <div class="form-element">
  <input type="hidden" name="visible_&dtml-index;:int:default"
         value="0" />
  <dtml-let chk="visible and 'checked' or ''">
  <input type="checkbox" name="visible_&dtml-index;:boolean"
         &dtml-chk; value="1" />
  </dtml-let>
  </div>
</td>
</tr>

</dtml-let>

<tr><td colspan="3">
<hr />
</td></tr>

</dtml-in>
</table>

<div class="form-element">
<table>
<tr>
<td><input type="submit" name="changeActions:method" value="Save" /></td>
<td><input type="submit" name="deleteActions:method" value="Delete" /></td>
<td><input type="submit" name="moveUpActions:method" value="Move up" /></td>
<td><input type="submit" name="moveDownActions:method" value="Move down" /></td>
</tr>
</table>
</div>

</dtml-if>

<h3 class="form-help">
Add an action
</h3>

<table>
<tr>
<td></td>
<td>
  <div class="form-label">
  Name
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="name" value="" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Id
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="id" value="" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Action
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="action" value="" size="80" />
  </div>
</td>
</tr>
<tr>
<td></td>
<td>
  <div class="form-label">
  Condition
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="condition" value="" size="80" />
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Permission
  </div>
</td>
<td>
  <div class="form-element">
  <select name="permission">
    <option value="">(none)</option>
    <dtml-in possible_permissions sort>
      <option value="&dtml-sequence-item;">&dtml-sequence-item;</option>
    </dtml-in>
  </select>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Category
  </div>
</td>
<td>
  <div class="form-element">
  <select name="category">
    <dtml-in getGroups>
       <option value=<dtml-var "_['sequence-item']['id']"> > <dtml-var "_['sequence-item']['title']"> </option>
    </dtml-in>
  </select>
  </div>
</td>
</tr>

<tr>
<td></td>
<td>
  <div class="form-label">
  Icon Expression
  </div>
</td>
<td>
  <div class="form-element">
  <input type="text" name="icon_expr" value="" size="80" />
  </div>
</td>
</tr>

<tr>

<td></td>
<td>
  <div class="form-label">
  Visible?
  </div>
</td>
<td>
  <div class="form-element">
  <input type="hidden" name="visible:int:default"
         value="0" />
  <input type="checkbox" name="visible:boolean" checked value="1"/>
  </div>
</td>
</tr>

</table>

<div class="form-element">
<input type="submit" name="addAction:method" value="Add" />
</div>

</form>

<dtml-if manage_page_footer>
  <dtml-var manage_page_footer>
<dtml-else>
  </body></html>
</dtml-if>
