Skip to content

Commit 159ebec

Browse files
committed
Replace autofocus with data-global-init="initInputAutoFocusEnd".
1 parent e947f30 commit 159ebec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+60
-60
lines changed

templates/admin/repo/unadopted.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<form class="ui form ignore-dirty">
1111
<div class="ui small fluid action input">
1212
<input name="search" value="true" type="hidden">
13-
<input name="q" value="{{.Keyword}}" placeholder="{{ctx.Locale.Tr "repo.adopt_search"}}" autofocus>
13+
<input name="q" value="{{.Keyword}}" placeholder="{{ctx.Locale.Tr "repo.adopt_search"}}" data-global-init="initInputAutoFocusEnd">
1414
{{template "shared/search/button"}}
1515
</div>
1616
</form>

templates/admin/user/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{.CsrfTokenHtml}}
1010
<div class="field {{if .Err_UserName}}error{{end}}">
1111
<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
12-
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}} maxlength="40">
12+
<input id="user_name" name="user_name" value="{{.User.Name}}" data-global-init="initInputAutoFocusEnd" {{if not .User.IsLocal}}disabled{{end}} maxlength="40">
1313
</div>
1414
<!-- Types and name -->
1515
<div class="inline required field {{if .Err_LoginType}}error{{end}}">

templates/admin/user/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</div>
5454
<div class="required field {{if .Err_UserName}}error{{end}}">
5555
<label for="user_name">{{ctx.Locale.Tr "username"}}</label>
56-
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required maxlength="40">
56+
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" data-global-init="initInputAutoFocusEnd" required maxlength="40">
5757
</div>
5858
<div class="required field {{if .Err_Email}}error{{end}}">
5959
<label for="email">{{ctx.Locale.Tr "email"}}</label>

templates/org/create.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{.CsrfTokenHtml}}
1111
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
1212
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
13-
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required maxlength="40">
13+
<input id="org_name" name="org_name" value="{{.org_name}}" data-global-init="initInputAutoFocusEnd" required maxlength="40">
1414
<span class="help">{{ctx.Locale.Tr "org.org_name_helper"}}</span>
1515
</div>
1616

templates/org/settings/delete.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{.CsrfTokenHtml}}
1313
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
1414
<label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
15-
<input id="org_name" name="org_name" value="" autocomplete="off" autofocus required>
15+
<input id="org_name" name="org_name" value="" autocomplete="off" data-global-init="initInputAutoFocusEnd" required>
1616
</div>
1717
<button class="ui red button delete-button" data-type="form" data-form="#delete-form">
1818
{{ctx.Locale.Tr "org.settings.confirm_delete_account"}}

templates/org/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{ctx.Locale.Tr "org.settings.change_orgname_redirect_prompt"}}
1313
</span>
1414
</label>
15-
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40">
15+
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" data-global-init="initInputAutoFocusEnd" required maxlength="40">
1616
</div>
1717
<div class="field {{if .Err_FullName}}error{{end}}">
1818
<label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label>

templates/org/team/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{{if eq .Team.LowerName "owners"}}
1717
<input type="hidden" name="team_name" value="{{.Team.Name}}">
1818
{{end}}
19-
<input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
19+
<input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} data-global-init="initInputAutoFocusEnd">
2020
<span class="help">{{ctx.Locale.Tr "org.team_name_helper"}}</span>
2121
</div>
2222
<div class="field {{if .Err_Description}}error{{end}}">

templates/projects/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
1515
<div class="field {{if .Err_Title}}error{{end}}">
1616
<label>{{ctx.Locale.Tr "repo.projects.title"}}</label>
17-
<input name="title" placeholder="{{ctx.Locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
17+
<input name="title" placeholder="{{ctx.Locale.Tr "repo.projects.title"}}" value="{{.title}}" data-global-init="initInputAutoFocusEnd" required>
1818
</div>
1919
<div class="field">
2020
<label>{{ctx.Locale.Tr "repo.projects.description"}}</label>

templates/repo/create.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
4040
<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
41-
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required maxlength="100">
41+
<input id="repo_name" name="repo_name" value="{{.repo_name}}" data-global-init="initInputAutoFocusEnd" required maxlength="100">
4242
<span class="help" data-help-for-repo-name>{{ctx.Locale.Tr "repo.repo_name_helper"}}</span>
4343
<span class="help tw-hidden" data-help-for-repo-name=".profile">{{ctx.Locale.Tr "repo.repo_name_profile_public_hint"}}</span>
4444
<span class="help tw-hidden" data-help-for-repo-name=".profile-private">{{ctx.Locale.Tr "repo.repo_name_profile_private_hint"}}</span>

templates/repo/editor/commit_form.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{ctx.Locale.Tr "repo.editor.commit_changes"}}
1010
{{- end}}</h3>
1111
<div class="field">
12-
<input name="commit_summary" maxlength="100" placeholder="{{if .PageIsDelete}}{{ctx.Locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{ctx.Locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{ctx.Locale.Tr "repo.editor.patch"}}{{else}}{{ctx.Locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
12+
<input name="commit_summary" maxlength="100" placeholder="{{if .PageIsDelete}}{{ctx.Locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{ctx.Locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{ctx.Locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{ctx.Locale.Tr "repo.editor.patch"}}{{else}}{{ctx.Locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" data-global-init="initInputAutoFocusEnd">
1313
</div>
1414
<div class="field">
1515
<textarea name="commit_message" placeholder="{{ctx.Locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>

0 commit comments

Comments
 (0)