Merge branch '3.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / login.tpl
CommitLineData
c893138d 1{include file='header' __disableLoginLink=true __disableAds=true}
320f4a6d 2
9c9d5d4b
AE
3{if $forceLoginRedirect}<p class="info">{lang}wcf.user.login.forceLogin{/lang}</p>{/if}
4
91082aee
AE
5{if !$errorField|empty && $errorField == 'cookie'}
6 <p class="error">{lang}wcf.user.login.error.cookieRequired{/lang}</p>
7{else}
8 {include file='formError'}
9{/if}
320f4a6d 10
6e4aa12f 11<div id="loginForm" class="section loginForm{if REGISTER_DISABLED} loginFormLoginOnly{/if}">
5ea92119
AE
12 <form method="post" action="{@$loginController}">
13 <section class="section loginFormLogin">
14 <h2 class="sectionTitle">{lang}wcf.user.login.login{/lang}</h2>
15
16 <dl{if $errorField == 'username'} class="formError"{/if}>
17 <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt>
320f4a6d 18 <dd>
6f2bc235 19 <input type="text" id="username" name="username" value="{$username}" required class="long">
5ea92119
AE
20 {if $errorField == 'username'}
21 <small class="innerError">
22 {if $errorType == 'empty'}
23 {lang}wcf.global.form.error.empty{/lang}
24 {else}
25 {lang}wcf.user.username.error.{@$errorType}{/lang}
26 {/if}
27 </small>
28 {/if}
320f4a6d
MW
29 </dd>
30 </dl>
320f4a6d 31
5ea92119
AE
32 <dl{if $errorField == 'password'} class="formError"{/if}>
33 <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
320f4a6d 34 <dd>
e5f9b56c 35 <input type="password" id="password" name="password" value="{$password}" class="long">
5ea92119
AE
36 {if $errorField == 'password'}
37 <small class="innerError">
38 {if $errorType == 'empty'}
39 {lang}wcf.global.form.error.empty{/lang}
40 {else}
41 {lang}wcf.user.password.error.{@$errorType}{/lang}
95961bdf 42 {/if}
5ea92119
AE
43 </small>
44 {/if}
45 <small><a href="{link controller='LostPassword'}{/link}">{lang}wcf.user.lostPassword{/lang}</a></small>
320f4a6d
MW
46 </dd>
47 </dl>
5ea92119
AE
48
49 {if $supportsPersistentLogins}
50 <dl>
51 <dt></dt>
52 <dd>
53 <label for="useCookies"><input type="checkbox" id="useCookies" name="useCookies" value="1"{if $useCookies} checked{/if}> {lang}wcf.user.useCookies{/lang}</label>
54 </dd>
55 </dl>
56 {/if}
57
58 {event name='fields'}
59
4f15d0d8 60 {include file='captcha' supportsAsyncCaptcha=true}
5ea92119
AE
61
62 <div class="userLoginButtons">
63 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
64 <input type="hidden" name="url" value="{$url}">
65 {@SECURITY_TOKEN_INPUT_TAG}
66 </div>
95961bdf 67 </section>
5ea92119
AE
68
69 {if !REGISTER_DISABLED}
70 <section class="section loginFormRegister">
71 <h2 class="sectionTitle">{lang}wcf.user.login.register{/lang}</h2>
72
73 <p>{lang}wcf.user.login.register.teaser{/lang}</p>
74
75 <div class="userLoginButtons">
76 <a href="{link controller='Register'}{/link}" class="button loginFormRegisterButton">{lang}wcf.user.login.register.registerNow{/lang}</a>
77 </div>
78 </section>
79 {/if}
80
81 {hascontent}
82 <section class="section loginFormThirdPartyLogin">
83 <h2 class="sectionTitle">{lang}wcf.user.login.3rdParty{/lang}</h2>
84
85 <dl>
86 <dt></dt>
87 <dd>
88 <ul class="buttonList smallButtons">
89 {content}
90 {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''}
91 <li id="githubAuth" class="thirdPartyLogin">
92 <a href="{link controller='GithubAuth'}{/link}" class="button thirdPartyLoginButton githubLoginButton"><span class="icon icon16 fa-github"></span> <span>{lang}wcf.user.3rdparty.github.login{/lang}</span></a>
93 </li>
94 {/if}
95
96 {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''}
97 <li id="twitterAuth" class="thirdPartyLogin">
98 <a href="{link controller='TwitterAuth'}{/link}" class="button thirdPartyLoginButton twitterLoginButton"><span class="icon icon16 fa-twitter"></span> <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a>
99 </li>
100 {/if}
101
102 {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''}
103 <li id="facebookAuth" class="thirdPartyLogin">
104 <a href="{link controller='FacebookAuth'}{/link}" class="button thirdPartyLoginButton facebookLoginButton"><span class="icon icon16 fa-facebook"></span> <span>{lang}wcf.user.3rdparty.facebook.login{/lang}</span></a>
105 </li>
106 {/if}
107
108 {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''}
109 <li id="googleAuth" class="thirdPartyLogin">
110 <a href="{link controller='GoogleAuth'}{/link}" class="button thirdPartyLoginButton googleLoginButton"><span class="icon icon16 fa-google-plus"></span> <span>{lang}wcf.user.3rdparty.google.login{/lang}</span></a>
111 </li>
112 {/if}
113
114 {event name='3rdpartyButtons'}
115 {/content}
116 </ul>
117 </dd>
118 </dl>
119 </section>
120 {/hascontent}
121 </form>
122</div>
320f4a6d 123
3e93caf9 124<script data-relocate="true">
3e93caf9
MW
125 $(function() {
126 new WCF.User.Login(false);
127 });
3e93caf9 128</script>
320f4a6d 129
3e93caf9 130{include file='footer' __disableAds=true}