<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%Links::Config::load_vars%>
<html>

<head>
  <title>Gossamer Links Setup: User Options</title>
  <%include include_style.html%>
</head>

<body>

<%set header_title = 'Admin Password'%>
<%set header_details = "From here, you can manage admin usernames and
passwords.  This uses Apache's .htaccess method of password protecting your
directory and will not work on servers other than Apache."%>
<%include include_header.html%>

<form method="post" action="setup.cgi">
<input type="hidden" name="do" value="setup_pass" />
<table>
  <tr>
    <th class="heading" colspan="2">Add New User:</th>
  </tr>
  <tr>
    <td class="option">Username:</td>
    <td class="value"><input type="text" name="admin_username"<%if error and admin_username%> value="<%admin_username%>"<%endif%> size="20" /></td>
  </tr>
  <tr>
    <td class="option">Password:</td>
    <td class="value"><input type="password" name="admin_password" size="20" /></td>
  </tr>
  <tr>
    <td class="option">Confirm Password:</td>
    <td class="value"><input type="password" name="admin_password_confirm" size="20" /></td>
  </tr>
</table>

<div class="submit">
  <input type="submit" value="Add New User" />
</div>
</form>

<%Links::Tools::auth_users%>
<%if htpasswd_users_count%>
<form method="post" action="setup.cgi" style="margin-top: 30px">
<input type="hidden" name="do" value="setup_pass" />
<input type="hidden" name="delete" value="1" />

<table>
  <tr>
    <th class="heading" colspan="2">Delete User:</th>
  </tr>
  <tr>
    <td class="option">username:</td>
    <td class="value">
      <select name="delete_user" size="1">
        <%loop htpasswd_users%>
        <option value="<%escape_html loop_value%>"><%escape_html loop_value%></option>
        <%endloop%>
      </select>
    </tr>
  </tr>
</table>

<div class="submit">
  <input type="submit" value="Delete User" />
</div>

</form>
<%endif%>

</body>
</html>
