<form method="post" name="folders" id="folders" action="<tag:aclurl />">
<input type="hidden" name="actionID" value="" />
<tag:forminput />

<div class="header">
 <tag:aclnavcell />
 <gettext>Share mail folders</gettext>
</div>

<div class="header">
 <ul>
  <li>
   <label for="aclfolder" class="hidden"><gettext>Change Folder</gettext></label>
   <tag:changefolder /><tag:sharedimg /></a> <select id="aclfolder" name="folder" onchange="ACLFolderChange()"><tag:options /></select>
  </li>
 </ul>
 <span class="smallheader"><tag:current /></span>
</div>
</form>

<form method="post" name="acl" id="acl" action="<tag:aclurl />">
<input type="hidden" name="actionID" value="imp_acl_set" />
<input type="hidden" name="folder" value="<tag:folder />" />
<tag:forminput />
<table cellspacing="0" width="100%">
<if:noacl>
 <tr>
  <td colspan="<tag:maxrule />" class="item leftAlign">
   <em><strong> <gettext>The current list of users with access to this folder could not be retrieved.</gettext></strong></em>
  </td>
  <td class="item leftAlign">&nbsp;</td>
 </tr>
 <tr>
  <td colspan="<tag:maxrule />" class="header" valign="middle">
   <input type="button" class="button" name="back" onclick="$('acl').disable(); document.location.href='<tag:prefsurl />'" value="<gettext>Return to Options</gettext>" />
  </td>
  <td class="header">&nbsp;</td>
 </tr>
<else:noacl>
<tr>
 <th class="item" width="<tag:width />">
  <h3><strong><gettext>User</gettext></strong></h3>
 </th>
 <loop:rights>
 <th class="item" width="<tag:width />">
  <h3><strong><tag:rights.desc /></strong></h3>
 </th>
 </loop:rights>
</tr>
<loop:curr_acl>
<tr>
 <td class="item"><tag:curr_acl.index /><input id="<tag:curr_acl.index />" type="hidden" name="acl[<tag:curr_acl.index />][]" value="" /></td>
 <loop:curr_acl.rule>
 <td class="item" align="center">
  <label class="hidden" for="<tag:curr_acl.index />:<tag:curr_acl.rule.val />">Rule <tag:curr_acl.rule.val /> for user <tag:curr_acl.index /></label>
  <input type="checkbox" class="checkbox" id="<tag:curr_acl.index />:<tag:curr_acl.rule.val />"
  <if:curr_acl.disabled> disabled="disabled"<else:curr_acl.disabled><if:canedit> name="acl[<tag:curr_acl.index />][]" value="<tag:curr_acl.rule.val />"<else:canedit> disabled="disabled"</else:canedit></if:canedit></else:curr_acl.disabled></if:curr_acl.disabled><if:curr_acl.rule.enabled> checked="checked"</if:curr_acl.rule.enabled> />
 </td>
 </loop:curr_acl.rule>
</tr>
</loop:curr_acl>

<if:canedit>
<tr>
 <td class="item">
  <label for="new_user" class="hidden">New User</label><tag:new_user />
 </td>
 <loop:rights>
 <td class="item" align="center">
  <label class="hidden" for="new_user:<tag:rights.right />">Rule <tag:rights.right /> for the new user</label><input id="new_user:<tag:rights.right />" type="checkbox" name="new_acl[]" value="<tag:rights.right />" class="checkbox" />
 </td>
 </loop:rights>
</tr>
<tr>
 <td>&nbsp;</td>
</tr>
<tr>
 <td colspan = "<tag:maxrule />" class="header" valign="middle">
  <input type="button" class="button" id="fbutton" name="fbutton" onclick="$('acl').submit(); $('acl').disable();" value="<gettext>Save</gettext>" />
  <input type="button" class="button" id="resetbut" name="resetbut" onclick="ACLFolderChange(true); return false;" value="<gettext>Reset</gettext>" />
  <input type="button" class="button" id="back" name="back" onclick="$('acl').disable(); document.location.href='<tag:prefsurl />'" value="<gettext>Return to Options</gettext>" />
 </td>
 <td class="header">&nbsp;</td>
</tr>
<else:canedit>
<tr>
 <td colspan="<tag:maxrule />" class="item leftAlign">
  <em><strong><gettext>You do not have permission to change access to this folder.</gettext></strong></em>
 </td>
 <td class="item leftAlign">&nbsp;</td>
</tr>

<tr>
 <td colspan="<tag:maxrule />" class="header" valign="middle">
  <input type="button" class="button" name="back" onclick="$('acl').disable(); document.location.href='<tag:prefsurl />'" value="<gettext>Return to Options</gettext>" />
 </td>
 <td class="header">&nbsp;</td>
</tr>
</else:canedit></if:canedit>
</else:noacl></if:noacl>
</table>
</form>
