unify layout between auth pages (#13547)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>tokarchuk/v1.17
parent
5c76c5ce44
commit
e16b0e5a90
@ -1,8 +1,10 @@ |
|||||||
{{template "base/head" .}} |
{{template "base/head" .}} |
||||||
<div class="user signin{{if .LinkAccountMode}} icon{{end}}"> |
<div class="user signin{{if .LinkAccountMode}} icon{{end}}"> |
||||||
{{template "user/auth/signin_navbar" .}} |
{{template "user/auth/signin_navbar" .}} |
||||||
<div class="ui container"> |
<div class="ui middle very relaxed page grid"> |
||||||
{{template "user/auth/signin_inner" .}} |
<div class="ui container column"> |
||||||
|
{{template "user/auth/signin_inner" .}} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
{{template "base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,3 +1,7 @@ |
|||||||
{{template "base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "user/auth/signup_inner" .}} |
<div class="user signin{{if .LinkAccountMode}} icon{{end}}"> |
||||||
|
<div class="ui middle very relaxed page grid"> |
||||||
|
{{template "user/auth/signup_inner" .}} |
||||||
|
</div> |
||||||
|
</div> |
||||||
{{template "base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,82 +1,78 @@ |
|||||||
<div class="user signup{{if .LinkAccountMode}} icon{{end}}"> |
<div class="ui container column{{if .LinkAccountMode}} icon{{end}}"> |
||||||
<div class="ui middle very relaxed page grid"> |
<h4 class="ui top attached header center"> |
||||||
<div class="column"> |
{{if .LinkAccountMode}} |
||||||
<form class="ui form" action="{{.SignUpLink}}" method="post"> |
{{.i18n.Tr "auth.oauth_signup_title"}} |
||||||
{{.CsrfTokenHtml}} |
{{else}} |
||||||
<h3 class="ui top attached header"> |
{{.i18n.Tr "sign_up"}} |
||||||
{{if .LinkAccountMode}} |
{{end}} |
||||||
{{.i18n.Tr "auth.oauth_signup_title"}} |
</h4> |
||||||
{{else}} |
<div class="ui attached segment"> |
||||||
{{.i18n.Tr "sign_up"}} |
<form class="ui form" action="{{.SignUpLink}}" method="post"> |
||||||
{{end}} |
{{.CsrfTokenHtml}} |
||||||
</h3> |
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} |
||||||
<div class="ui attached segment"> |
{{template "base/alert" .}} |
||||||
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} |
{{end}} |
||||||
{{template "base/alert" .}} |
{{if .DisableRegistration}} |
||||||
{{end}} |
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p> |
||||||
{{if .DisableRegistration}} |
{{else}} |
||||||
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p> |
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
||||||
{{else}} |
<label for="user_name">{{.i18n.Tr "username"}}</label> |
||||||
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> |
||||||
<label for="user_name">{{.i18n.Tr "username"}}</label> |
</div> |
||||||
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> |
<div class="required inline field {{if .Err_Email}}error{{end}}"> |
||||||
</div> |
<label for="email">{{.i18n.Tr "email"}}</label> |
||||||
<div class="required inline field {{if .Err_Email}}error{{end}}"> |
<input id="email" name="email" type="email" value="{{.email}}" required> |
||||||
<label for="email">{{.i18n.Tr "email"}}</label> |
</div> |
||||||
<input id="email" name="email" type="email" value="{{.email}}" required> |
|
||||||
</div> |
|
||||||
|
|
||||||
{{if not .DisablePassword}} |
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label> |
|
||||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required> |
|
||||||
</div> |
|
||||||
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
|
||||||
<label for="retype">{{.i18n.Tr "re_type"}}</label> |
|
||||||
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required> |
|
||||||
</div> |
|
||||||
{{end}} |
|
||||||
{{if and .EnableCaptcha (eq .CaptchaType "image")}} |
|
||||||
<div class="inline field"> |
|
||||||
<label></label> |
|
||||||
{{.Captcha.CreateHtml}} |
|
||||||
</div> |
|
||||||
<div class="required inline field {{if .Err_Captcha}}error{{end}}"> |
|
||||||
<label for="captcha">{{.i18n.Tr "captcha"}}</label> |
|
||||||
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off"> |
|
||||||
</div> |
|
||||||
{{end}} |
|
||||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}} |
|
||||||
<div class="inline field required"> |
|
||||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div> |
|
||||||
</div> |
|
||||||
{{end}} |
|
||||||
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}} |
|
||||||
<div class="inline field required"> |
|
||||||
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div> |
|
||||||
</div> |
|
||||||
{{end}} |
|
||||||
|
|
||||||
<div class="inline field"> |
{{if not .DisablePassword}} |
||||||
<label></label> |
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
||||||
<button class="ui green button"> |
<label for="password">{{.i18n.Tr "password"}}</label> |
||||||
{{if .LinkAccountMode}} |
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required> |
||||||
{{.i18n.Tr "auth.oauth_signup_submit"}} |
</div> |
||||||
{{else}} |
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> |
||||||
{{.i18n.Tr "auth.create_new_account"}} |
<label for="retype">{{.i18n.Tr "re_type"}}</label> |
||||||
{{end}} |
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required> |
||||||
</button> |
</div> |
||||||
</div> |
{{end}} |
||||||
|
{{if and .EnableCaptcha (eq .CaptchaType "image")}} |
||||||
|
<div class="inline field"> |
||||||
|
<label></label> |
||||||
|
{{.Captcha.CreateHtml}} |
||||||
|
</div> |
||||||
|
<div class="required inline field {{if .Err_Captcha}}error{{end}}"> |
||||||
|
<label for="captcha">{{.i18n.Tr "captcha"}}</label> |
||||||
|
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off"> |
||||||
|
</div> |
||||||
|
{{end}} |
||||||
|
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}} |
||||||
|
<div class="inline field required"> |
||||||
|
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div> |
||||||
|
</div> |
||||||
|
{{end}} |
||||||
|
{{if and .EnableCaptcha (eq .CaptchaType "hcaptcha")}} |
||||||
|
<div class="inline field required"> |
||||||
|
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div> |
||||||
|
</div> |
||||||
|
{{end}} |
||||||
|
|
||||||
{{if not .LinkAccountMode}} |
<div class="inline field"> |
||||||
<div class="inline field"> |
<label></label> |
||||||
<label></label> |
<button class="ui green button"> |
||||||
<a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a> |
{{if .LinkAccountMode}} |
||||||
</div> |
{{.i18n.Tr "auth.oauth_signup_submit"}} |
||||||
|
{{else}} |
||||||
|
{{.i18n.Tr "auth.create_new_account"}} |
||||||
{{end}} |
{{end}} |
||||||
{{end}} |
</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
{{if not .LinkAccountMode}} |
||||||
|
<div class="inline field"> |
||||||
|
<label></label> |
||||||
|
<a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a> |
||||||
</div> |
</div> |
||||||
</form> |
{{end}} |
||||||
</div> |
{{end}} |
||||||
|
</form> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue