Skip to content

Commit 6e9b587

Browse files
committed
Revert "move sign in labels to be above inputs (go-gitea#28753)"
This reverts commit 1c14cd0.
1 parent 8326e7b commit 6e9b587

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

templates/user/auth/signin_inner.tmpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@
99
{{end}}
1010
</h4>
1111
<div class="ui attached segment">
12-
<form class="ui form gt-max-width-36rem gt-m-auto" action="{{.SignInLink}}" method="post">
12+
<form class="ui form" action="{{.SignInLink}}" method="post">
1313
{{.CsrfTokenHtml}}
1414
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
1515
<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
16-
<input id="user_name" class="gt-w-full" type="text" name="user_name" value="{{.user_name}}" autofocus required>
16+
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
1717
</div>
1818
{{if or (not .DisablePassword) .LinkAccountMode}}
1919
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
2020
<label for="password">{{ctx.Locale.Tr "password"}}</label>
21-
<input id="password" class="gt-w-full" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
21+
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
2222
</div>
2323
{{end}}
2424
{{if not .LinkAccountMode}}
2525
<div class="inline field">
26+
<label></label>
2627
<div class="ui checkbox">
2728
<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
2829
<input name="remember" type="checkbox">
@@ -33,6 +34,7 @@
3334
{{template "user/auth/captcha" .}}
3435

3536
<div class="inline field">
37+
<label></label>
3638
<button class="ui primary button">
3739
{{if .LinkAccountMode}}
3840
{{ctx.Locale.Tr "auth.oauth_signin_submit"}}
@@ -45,6 +47,7 @@
4547

4648
{{if .ShowRegistrationButton}}
4749
<div class="inline field">
50+
<label></label>
4851
<a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now" | Str2html}}</a>
4952
</div>
5053
{{end}}
@@ -57,7 +60,7 @@
5760
<div class="gt-df gt-fc gt-jc">
5861
<div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3">
5962
{{range $provider := .OAuth2Providers}}
60-
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 gt-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
63+
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
6164
{{$provider.IconHTML 28}}
6265
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}}
6366
</a>

templates/user/auth/signin_openid.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
OpenID
99
</h4>
1010
<div class="ui attached segment">
11-
<form class="ui form gt-m-auto" action="{{.Link}}" method="post">
11+
<form class="ui form" action="{{.Link}}" method="post">
1212
{{.CsrfTokenHtml}}
1313
<div class="inline field">
1414
{{ctx.Locale.Tr "auth.openid_signin_desc"}}
@@ -18,15 +18,17 @@
1818
{{svg "fontawesome-openid"}}
1919
OpenID URI
2020
</label>
21-
<input id="openid" class="gt-w-full" name="openid" value="{{.openid}}" autofocus required>
21+
<input id="openid" name="openid" value="{{.openid}}" autofocus required>
2222
</div>
2323
<div class="inline field">
24+
<label></label>
2425
<div class="ui checkbox">
2526
<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
2627
<input name="remember" type="checkbox">
2728
</div>
2829
</div>
2930
<div class="inline field">
31+
<label></label>
3032
<button class="ui primary button">{{ctx.Locale.Tr "sign_in"}}</button>
3133
</div>
3234
</form>

templates/user/auth/signup_inner.tmpl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{{end}}
88
</h4>
99
<div class="ui attached segment">
10-
<form class="ui form gt-max-width-36rem gt-m-auto" action="{{.SignUpLink}}" method="post">
10+
<form class="ui form" action="{{.SignUpLink}}" method="post">
1111
{{.CsrfTokenHtml}}
1212
{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
1313
{{template "base/alert" .}}
@@ -17,27 +17,28 @@
1717
{{else}}
1818
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
1919
<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
20-
<input id="user_name" class="gt-w-full" type="text" name="user_name" value="{{.user_name}}" autofocus required>
20+
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
2121
</div>
2222
<div class="required inline field {{if .Err_Email}}error{{end}}">
2323
<label for="email">{{ctx.Locale.Tr "email"}}</label>
24-
<input id="email" class="gt-w-full" name="email" type="email" value="{{.email}}" required>
24+
<input id="email" name="email" type="email" value="{{.email}}" required>
2525
</div>
2626

2727
{{if not .DisablePassword}}
2828
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
2929
<label for="password">{{ctx.Locale.Tr "password"}}</label>
30-
<input id="password" class="gt-w-full" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
30+
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
3131
</div>
3232
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
3333
<label for="retype">{{ctx.Locale.Tr "re_type"}}</label>
34-
<input id="retype" class="gt-w-full" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required>
34+
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required>
3535
</div>
3636
{{end}}
3737

3838
{{template "user/auth/captcha" .}}
3939

4040
<div class="inline field">
41+
<label></label>
4142
<button class="ui primary button">
4243
{{if .LinkAccountMode}}
4344
{{ctx.Locale.Tr "auth.oauth_signup_submit"}}
@@ -49,6 +50,7 @@
4950

5051
{{if not .LinkAccountMode}}
5152
<div class="inline field">
53+
<label></label>
5254
<a href="{{AppSubUrl}}/user/login">{{ctx.Locale.Tr "auth.register_helper_msg"}}</a>
5355
</div>
5456
{{end}}
@@ -62,7 +64,7 @@
6264
<div class="gt-df gt-fc gt-jc">
6365
<div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3">
6466
{{range $provider := .OAuth2Providers}}
65-
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 gt-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
67+
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
6668
{{$provider.IconHTML 28}}
6769
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}}
6870
</a>

web_src/css/form.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ textarea:focus,
243243
.user.forgot.password form,
244244
.user.reset.password form,
245245
.user.link-account form,
246+
.user.signin form,
246247
.user.signup form {
247248
margin: auto;
248249
width: 700px !important;
@@ -278,6 +279,7 @@ textarea:focus,
278279
.user.forgot.password form .inline.field > label,
279280
.user.reset.password form .inline.field > label,
280281
.user.link-account form .inline.field > label,
282+
.user.signin form .inline.field > label,
281283
.user.signup form .inline.field > label {
282284
text-align: right;
283285
width: 250px !important;

web_src/css/helpers.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Gitea's private styles use `g-` prefix.
4848

4949
.gt-max-width-12rem { max-width: 12rem !important; }
5050
.gt-max-width-24rem { max-width: 24rem !important; }
51-
.gt-max-width-36rem { max-width: 36rem !important; }
5251

5352
/* below class names match Tailwind CSS */
5453
.gt-break-all { word-break: break-all !important; }

0 commit comments

Comments
 (0)