%{ This is a default template }%%TMPL:INCLUDE{"foswiki"}%

%TMPL:DEF{"webaction"}%%MAKETEXT{"Foswiki User Authentication"}%%TMPL:END%
%TMPL:DEF{"titleaction"}%%MAKETEXT{"(login)"}% %TMPL:END%
%TMPL:DEF{"LOG_IN_BANNER"}%%TMPL:END%
%TMPL:DEF{"LOGGED_IN_BANNER"}%%MAKETEXT{"[_1] is currently logged in" args="%USERSWEB%.%WIKINAME%"}%%TMPL:END%
%TMPL:DEF{"NEW_USER_NOTE"}%%MAKETEXT{"Enter a new username and password to change identity"}%%TMPL:END%
%TMPL:DEF{"UNRECOGNISED_USER"}%%MAKETEXT{"Oops: we could not recognize you. Try again or [[[_1]][reset your password]]." args="%SCRIPTURLPATH{view}%/%SYSTEMWEB%/ResetPassword?username=%URLPARAM{usernamestep}%"}%%TMPL:END%

%TMPL:DEF{"titleaction"}%%MAKETEXT{"([_1] login)" args="<nop>%WIKITOOLNAME%"}%%TMPL:END%



%TMPL:DEF{"title"}%<h2>%MAKETEXT{"Log on to [_1]" args="%WIKITOOLNAME%"}%</h2>%TMPL:END%

%TMPL:DEF{"titlestep"}%<div class='foswikiFormStep'>%TMPL:P{"title"}%
%TMPL:P{"notestep"}%%TMPL:P{"errorstep"}%</div>%TMPL:END%

%TMPL:DEF{"notestep"}%%IF{
    "defined NOTE AND $NOTE != ''"
    then="<h3>%NOTE%</h3>"
}%%TMPL:END%

%TMPL:DEF{"errorstep"}%%IF{
    "(defined ERROR AND $ERROR != '') or (defined BANNER AND $BANNER != '')"
    then="<div class='foswikiNotification foswikiAlert foswikiUnvisited'>%BANNER%%IF{
        "defined ERROR AND $ERROR != ''"     
        then="$percntTMPL:P{$quoterror$quot}$percnt"
    }%</div>"}%%TMPL:END%

%TMPL:DEF{"error"}%<div>$percntERROR$percnt</div>%TMPL:END%

%TMPL:DEF{"authrealm"}%%MAKETEXT{"This is your name written as !WikiWord, for example: !JohnSmith. [[[_1]][Register]] if you do not have an account yet." args="%SYSTEMWEB%.UserRegistration"}%%TMPL:END%

%TMPL:DEF{"formstart"}%<form action='%SCRIPTURLPATH{"login"}%%PATH_INFO%' name='loginform' method='post' onsubmit='document.loginform.foswiki_origin.value+=window.location.hash'>%TMPL:END%

%TMPL:DEF{"formend"}%<literal>
%QUERYPARAMS{encoding="entity" format="<input type='hidden' name='$name' value='$value' />"}%
</literal><input type="hidden" name="foswiki_origin" value="%FOSWIKI_ORIGIN%" />
</form>%TMPL:END%

%TMPL:DEF{"usernamefield"}%<input tabindex='1' type='text' class='foswikiInputField foswikiFocus' size='40' name='username' value='%URLPARAM{"usernamestep"}%' %TMPL:P{context="no_auto_complete_login" then="autocomplete_off"}% />%TMPL:END%

%TMPL:DEF{"usernamestep"}%<div class="foswikiFormStep">
<h3>%IF{
  "{TemplateLogin}{AllowLoginUsingEmailAddress}" 
  then="%MAKETEXT{"Username or email address"}%"
  else="%MAKETEXT{"Username"}%" 
}%</h3>
<p>%TMPL:P{"usernamefield"}% %TMPL:P{"usernamefieldhelplink"}%</p>%TMPL:P{"usernamefieldhelpcontents"}%
</div>%TMPL:END%

%TMPL:DEF{"usernamenote"}%%TMPL:P{"authrealm"}%%TMPL:END%

%TMPL:DEF{"usernamefieldhelplink"}%%TWISTYBUTTON{mode="span" id="loginhelp" showlink="%MAKETEXT{"Help"}%" hidelink="%MAKETEXT{"Hide help"}%" firststart="show" remember="on"}%%TMPL:END%

%TMPL:DEF{"usernamefieldhelpcontents"}%%TWISTYTOGGLE{id="loginhelp" mode="div" class="foswikiHelp"}%%TMPL:P{"usernamenote"}%%ENDTWISTYTOGGLE%%TMPL:END%

%TMPL:DEF{"passwordfield"}%<input tabindex='2' type='password' class='foswikiInputField' size='40' name='password' value='' %TMPL:P{context="no_auto_complete_login" then="autocomplete_off"}% />%TMPL:END%

%TMPL:DEF{"autocomplete_off"}% autocomplete='off' %TMPL:END%

%TMPL:DEF{"passwordfieldnoteremember"}%%TMPL:P{"passwordfield"}% %TMPL:P{"passwordnote"}%
%TMPL:P{context="can_remember_login" then="rememberbox"}%%TMPL:END%

%TMPL:DEF{"passwordstep"}%<div class="foswikiFormStep">
<h3>%MAKETEXT{"Password"}%</h3>
<p>%TMPL:P{"passwordfieldnoteremember"}%</p>
</div>%TMPL:END%

%TMPL:DEF{"passwordnote"}%<span class="foswikiUnvisited">[[%SCRIPTURLPATH{view}%/%SYSTEMWEB%/ResetPassword?username=%URLPARAM{usernamestep}%][%MAKETEXT{"I forgot my password"}%]]</span>%TMPL:END%

%TMPL:DEF{"rememberbox"}%%BR%<input tabindex='3' id="remember" name="remember" type="checkbox" value="1" /><label for="remember">&nbsp;%MAKETEXT{"Remember me on this computer"}%</label>%TMPL:END%

%TMPL:DEF{"submitstep"}%<div class="foswikiFormStep"><p>%TMPL:P{"submit"}%</p></div>%TMPL:END%

%TMPL:DEF{"submit"}%<input tabindex='4' type='submit' class='foswikiSubmit' value='%MAKETEXT{"Logon"}%' />%TMPL:END%

%{ please keep the spaces between the div and the TMPL seealsonote, it allows Foswiki to process the emailaddress }%
%TMPL:DEF{"seealsostep"}%<div class="foswikiFormStep"><p class="foswikiGrayText"> %TMPL:P{"seealsonote"}% </p></div>%TMPL:END%

%TMPL:DEF{"seealsonote"}%%MAKETEXT{"If you have any questions, please contact [_1]" args="%IF{"defined WIKIWEBMASTER AND $WIKIWEBMASTER != ''" then="%WIKIWEBMASTER%" else="your Wiki administrator"}%"}%%TMPL:END%

%TMPL:DEF{"form"}%<div id="foswikiLogin">
<div class="foswikiFormSteps">%TMPL:P{"formstart"}%%TMPL:P{"titlestep"}%
%TMPL:P{"usernamestep"}%%TMPL:P{"passwordstep"}%%TMPL:P{"submitstep"}%
%TMPL:P{"formend"}%
%TMPL:P{"seealsostep"}%
</div>
</div>%TMPL:END%

%TMPL:DEF{"content"}%%TMPL:P{"form"}%%TMPL:END%
