<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="[% language %]">
<head>
  <title>[% site_name %] - Set username/preferences</title>
  [% IF stylesheet %]
    <link rel="stylesheet" href="[% stylesheet %]" type="text/css">
  [% END %]
</head>

<body>
[% INCLUDE banner.tt %]
<div id="content">
<table border="0" cellpadding="0" cellspacing="0" width="100%" summary="Controls for setting your preferences on how this site functions">
<tr>
<td valign="top">
[% IF show_form %]

  <form action="preferences.cgi" method="post">
    <h1>Username</h1>
    <p><label for="username">How you wish to be identified in Recent Changes:</label></p>
    <input type="text" size="20" id="username" name="username" value="[% username %]" />

    <h1>Preferences</h1>

    <p>
    [% IF preview_above_edit_box %]
      <input type="checkbox" id="preview_above" name="preview_above_edit_box" value="1" checked />
    [% ELSE %]
      <input type="checkbox" id="preview_above" name="preview_above_edit_box" value="1" />
    [% END %]
    <label for="preview_above">Put the preview above the edit area when previewing a page edit.</label>
    </p>

    <p>
    [% IF include_geocache_link %]
      <input type="checkbox" id="geocache" name="include_geocache_link" value="1" checked />
    [% ELSE %]
      <input type="checkbox" id="geocache" name="include_geocache_link" value="1" />
    [% END %]
    <label for="geocache">Include &#8220;Look for nearby geocaches&#8221; link in navbar.</label>
    </p>

    <p>
    [% IF latlong_traditional %]
      <input type="checkbox" id="latlong" name="latlong_traditional" value="1" checked />
    [% ELSE %]
      <input type="checkbox" id="latlong" name="latlong_traditional" value="1" />
    [% END %]
    <label for="latlong">Display latitude and longitude as degrees and minutes instead of decimal.</label>
    </p>

    <p>
    [% IF omit_help_links %]
      <input type="checkbox" id="omit_help" name="omit_help_links" value="1" checked />
    [% ELSE %]
      <input type="checkbox" id="omit_help" name="omit_help_links" value="1" />
    [% END %]
    <label for="omit_help">Omit help links from navbar.</label>
    </p>

    <p>
    [% IF show_minor_edits_in_rc %]
      <input type="checkbox" id="show_minor" name="show_minor_edits_in_rc" value="1" checked />
    [% ELSE %]
      <input type="checkbox" id="show_minor" name="show_minor_edits_in_rc" value="1" />
    [% END %]
    <label for="show_minor">Include &#8220;minor edits&#8221; in Recent Changes.</label>
    </p>

    <p>
      [% IF track_recent_changes_views %]
        <input type="checkbox" id="track_recent_changes_views" name="track_recent_changes_views" value="1" checked="1" />
      [% ELSE %]
        <input type="checkbox" id="track_recent_changes_views" name="track_recent_changes_views" value="1" />
      [% END %]
      <label for="track_recent_changes_views">Track my visits to Recent Changes and offer me a link for &#8220;changes since I last viewed Recent Changes&#8221;.</label>
    </p>

    <p>
      <label for="default_edit_type">Default edit type:</label>
      <select name="default_edit_type">
        [% IF default_edit_type == 'normal' %]
          <option value="normal" selected="1">Normal edit</option>
          <option value="tidying">Minor tidying</option>
        [% ELSE %]
          <option value="normal">Normal edit</option>
          <option value="tidying" selected="1">Minor tidying</option>
        [% END %]
      </select>
    </p>

    <p>
      <label for="cookie_expires">Preferences expire:</label>
      <select name="cookie_expires">
        [% IF cookie_expires == 'never' %]
          <option value="month">in one month</option>
          <option value="year">in one year</option>
          <option value="never" selected="1">never</option>
        [% ELSIF cookie_expires == "year" %]
          <option value="month">in one month</option>
          <option value="year" selected="1">in one year</option>
          <option value="never">never</option>
        [% ELSE %]
          <option value="month" selected="1">in one month</option>
          <option value="year">in one year</option>
          <option value="never">never</option>
        [% END %]
      </select>
    </p>

    <input type="submit" value="Set it" class="form_button" />
    <input type="hidden" name="action" value="set_preferences">
  </form>

[% ELSE %]

  <h1>Username/preferences saved</h1>

  <p>Username set to &#8220;[% username %]&#8221;.</p>

  <p>Preview area shown
    [% IF preview_above_edit_box %]
      above
    [% ELSE %]
      below
    [% END %]
  edit box.</p>

  <p>&#8220;Look for nearby geocaches&#8221; link
    [% UNLESS include_geocache_link %] not [% END %]
  included in navbar.</p>

  <p>Latitude and longitude displayed as
    [% IF latlong_traditional %]
      degrees and minutes.
    [% ELSE %]
      decimal.
    [% END %]
  </p>

  <p>Help links will
    [% IF omit_help_links %] not [% END %]
    be included in navbar.
  </p>

  <p>Minor edits
    [% UNLESS show_minor_edits_in_rc %] not [% END %]
  included in Recent Changes.</p>

  <p>Your visits to Recent Changes will
    [% UNLESS track_recent_changes_views %] not [% END %]
  be tracked.</p>

  <p>Default edit type set to
    [% IF default_edit_type == 'normal' %]
      &#8220;Normal edit&#8221;.
    [% ELSE %]
      &#8220;Minor tidying&#8221;.
    [% END %]
  </p>

  <p>Your preferences will
    [% IF cookie_expires == 'never' %]
      never expire.
    [% ELSIF cookie_expires == 'year' %]
      expire in one year.
    [% ELSE %]
      expire in one month.
    [% END %]
  </p>

<ul>
  <li><a href="[% full_cgi_url %]">Return to [% site_name %]</a></li>
  <li><a href="preferences.cgi">Change preferences</a></li>
</ul>

[% END %]
</td>
<td valign="top">[% INCLUDE navbar.tt %]</td>
</tr>
</table>
</div>
</body>
</html>