<div class="row spacer clear">
  <div class="description">Change <%if change_permission eq 'access'%>access directories<%else%>command permissions<%endif%> for following users (The changes will not apply for admin users).</div>
  <label id="mod_username" class="name">Username</label>
  <div class="value"><b><%loop users_loop%><input type="hidden" name="cuser" value="<%name%>" /><%name%><%ifnot last%>, <%endif%><%endloop%></b></div>
</div>
<%if change_permission ne 'access'%>
<div class="row clear">
  <label class="name">Permissions</label>
  <div class="value">
    <table>
      <tr>
        <td>
          <input type="checkbox" id="search" name="perm_search" value="1"<%if cfg.default.permission.search%> checked="checked"<%endif%> class="checkbox"  /><label for="search">Search</label><br />
          <input type="checkbox" id="replace" name="perm_replace" value="1"<%if user.username%><%if user.permission.replace%> checked="checked"<%endif%><%elsif cfg.default.permission.replace%> checked="checked"<%endif%> class="checkbox" /><label for="replace">Replace</label><br />
          <input type="checkbox" id="command" name="perm_command" value="1"<%if user.username%><%if user.permission.command%> checked="checked"<%endif%><%elsif cfg.default.permission.command%> checked="checked"<%endif%> class="checkbox" /><label for="command">Command</label><br />
          <input type="checkbox" id="upload" name="perm_upload" value="1"<%if user.username%><%if user.permission.upload%> checked="checked"<%endif%><%elsif cfg.default.permission.upload%> checked="checked"<%endif%> class="checkbox" /><label for="upload">Upload</label>
        </td>
        <td>
          <input type="checkbox" id="newfile" name="perm_newfile" value="1"<%if user.username%><%if user.permission.newfile%> checked="checked"<%endif%><%elsif cfg.default.permission.newfile%> checked="checked"<%endif%> class="checkbox"  /><label for="newfile">New File</label><br />
          <input type="checkbox" id="mkdir" name="perm_mkdir" value="1"<%if user.username%><%if user.permission.makedir%> checked="checked"<%endif%><%elsif cfg.default.permission.makedir%> checked="checked"<%endif%> class="checkbox" /><label for="mkdir">New Folder</label><br />
          <input type="checkbox" id="protect" name="perm_protect" value="1"<%if user.username%><%if user.permission.protect%> checked="checked"<%endif%><%elsif cfg.default.permission.protect%> checked="checked"<%endif%> class="checkbox" /><label for="protect">Protect</label><br />
          <input type="checkbox" id="preferences" name="perm_preferences" value="1"<%if user.username%><%if user.permission.preferences%> checked="checked"<%endif%><%elsif cfg.default.permission.preferences%> checked="checked"<%endif%> class="checkbox" /><label for="preferences">Preferences</label>
        </td>
        <td>
          <input type="checkbox" id="edit" name="perm_edit" value="1"<%if user.username%><%if user.permission.edit%> checked="checked"<%endif%><%elsif cfg.default.permission.edit%> checked="checked"<%endif%> class="checkbox"  /><label for="edit">Edit File</label><br />
          <input type="checkbox" id="download" name="perm_download" value="1"<%if user.username%><%if user.permission.download%> checked="checked"<%endif%><%elsif cfg.default.permission.download%> checked="checked"<%endif%> class="checkbox" /><label for="download">Download</label><br />
          <input type="checkbox" id="symlink" name="perm_symlink" value="1"<%if user.username%><%if user.permission.symlink%> checked="checked"<%endif%><%elsif cfg.default.permission.symlink%> checked="checked"<%endif%> class="checkbox" /><label for="symlink">Symlink</label><br />
          <input type="checkbox" id="copy" name="perm_copy" value="1"<%if user.username%><%if user.permission.copy%> checked="checked"<%endif%><%elsif cfg.default.permission.copy%> checked="checked"<%endif%> class="checkbox" /><label for="copy">Copy</label>
        </td>
        <td>
          <input type="checkbox" id="move" name="perm_move" value="1"<%if user.username%><%if user.permission.move%> checked="checked"<%endif%><%elsif cfg.default.permission.move%> checked="checked"<%endif%> class="checkbox"  /><label for="move">Move</label><br />
          <input type="checkbox" id="rename" name="perm_rename" value="1"<%if user.username%><%if user.permission.rename%> checked="checked"<%endif%><%elsif cfg.default.permission.rename%> checked="checked"<%endif%> class="checkbox"  /><label for="rename">Rename</label><br />
          <input type="checkbox" id="delete" name="perm_delete" value="1"<%if user.username%><%if user.permission.delete%> checked="checked"<%endif%><%elsif cfg.default.permission.delete%> checked="checked"<%endif%> class="checkbox" /><label for="delete">Delete</label><br />
          <input type="checkbox" id="compress" name="perm_compress" value="1"<%if user.username%><%if user.permission.compress%> checked="checked"<%endif%><%elsif cfg.default.permission.compress%> checked="checked"<%endif%> class="checkbox" /><label for="compress">Compress</label><br />
        </td>
        <td>
          <input type="checkbox" id="chmod" name="perm_chmod" value="1"<%if user.username%><%if user.permission.chmod%> checked="checked"<%endif%><%elsif cfg.default.permission.chmod%> checked="checked"<%endif%> class="checkbox" /><label for="chmod">Chmod</label><br />
          <input type="checkbox" id="tail" name="perm_tail" value="1"<%if user.username%><%if user.permission.tail%> checked="checked"<%endif%><%elsif cfg.default.permission.tail%> checked="checked"<%endif%> class="checkbox" /><label for="tail">Tail</label><br />
          <input type="checkbox" id="perl" name="perm_perl" value="1"<%if user.username%><%if user.permission.perl%> checked="checked"<%endif%><%elsif cfg.default.permission.perl%> checked="checked"<%endif%> class="checkbox" /><label for="perl">Perl</label><br />
          <input type="checkbox" id="diff" name="perm_diff" value="1"<%if user.username%><%if user.permission.diff%> checked="checked"<%endif%><%elsif cfg.default.permission.diff%> checked="checked"<%endif%> class="checkbox" /><label for="diff">Diff</label><br />
        </td>
      </tr>
    </table>
  </div>
</div>
<%else%>
<div class="row clear">
  <label class="name">Access Directories</label>
  <div class="value">
    <input type="button" name="button-browse" value="Browse..." class="button" /><br />
    <textarea id="access_directories" name="access_directories" class="user-access" readonly></textarea>
  </div>
</div>
<%endif%>
