diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/user/edit.tmpl | 12 | ||||
-rw-r--r-- | templates/admin/user/new.tmpl | 2 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/create.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/issue/search.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/migrate/codebase.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/git.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/gitbucket.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/gitea.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/github.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/gitlab.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/gogs.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/migrate/onedev.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/applications.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/applications_oauth2_edit_form.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/applications_oauth2_list.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/keys_ssh.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/profile.tmpl | 10 |
19 files changed, 38 insertions, 38 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 30109cc923..00d21f24b0 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -9,7 +9,7 @@ {{.CsrfTokenHtml}} <div class="field {{if .Err_UserName}}error{{end}}"> <label for="user_name">{{.locale.Tr "username"}}</label> - <input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}}> + <input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}} maxlength="40"> </div> <!-- Types and name --> <div class="inline required field {{if .Err_LoginType}}error{{end}}"> @@ -59,7 +59,7 @@ </div> <div class="field {{if .Err_FullName}}error{{end}}"> <label for="full_name">{{.locale.Tr "settings.full_name"}}</label> - <input id="full_name" name="full_name" value="{{.User.FullName}}"> + <input id="full_name" name="full_name" value="{{.User.FullName}}" maxlength="100"> </div> <div class="required field {{if .Err_Email}}error{{end}}"> <label for="email">{{.locale.Tr "email"}}</label> @@ -72,18 +72,18 @@ </div> <div class="field {{if .Err_Website}}error{{end}}"> <label for="website">{{.locale.Tr "settings.website"}}</label> - <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com"> + <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com" maxlength="255"> </div> <div class="field {{if .Err_Location}}error{{end}}"> <label for="location">{{.locale.Tr "settings.location"}}</label> - <input id="location" name="location" value="{{.User.Location}}"> + <input id="location" name="location" value="{{.User.Location}}" maxlength="50"> </div> <div class="ui divider"></div> <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}"> <label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label> - <input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.User.MaxRepoCreation}}"> + <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.User.MaxRepoCreation}}"> <p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p> </div> @@ -181,7 +181,7 @@ <div class="inline field"> <label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label> - <input name="avatar" type="file" > + <input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp"> </div> <div class="field"> diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl index dbf01fb43e..691d63aead 100644 --- a/templates/admin/user/new.tmpl +++ b/templates/admin/user/new.tmpl @@ -53,7 +53,7 @@ </div> <div class="required field {{if .Err_UserName}}error{{end}}"> <label for="user_name">{{.locale.Tr "username"}}</label> - <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> + <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required maxlength="40"> </div> <div class="required field {{if .Err_Email}}error{{end}}"> <label for="email">{{.locale.Tr "email"}}</label> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 6f9f076548..21b14200ff 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -69,7 +69,7 @@ <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}"> <label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label> - <input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.Org.MaxRepoCreation}}"> + <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}"> <p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p> </div> {{end}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 85b02f394d..05e7052ff4 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -43,7 +43,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required maxlength="100"> <span class="help">{{.locale.Tr "repo.repo_name_helper"}}</span> </div> <div class="inline field"> @@ -61,7 +61,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description" placeholder="{{.locale.Tr "repo.repo_desc_helper"}}">{{.description}}</textarea> + <textarea id="description" name="description" placeholder="{{.locale.Tr "repo.repo_desc_helper"}}" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> <label>{{.locale.Tr "repo.template"}}</label> diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl index f24c2dbb7e..97b22d3699 100644 --- a/templates/repo/issue/search.tmpl +++ b/templates/repo/issue/search.tmpl @@ -7,7 +7,7 @@ <input type="hidden" name="project" value="{{$.ProjectID}}"> <input type="hidden" name="assignee" value="{{$.AssigneeID}}"> <input type="hidden" name="poster" value="{{$.PosterID}}"> - <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> + <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." maxlength="255"> {{if .PageIsIssueList}} <button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button> {{end}} diff --git a/templates/repo/migrate/codebase.tmpl b/templates/repo/migrate/codebase.tmpl index 5bfd3adc2d..41e9c273bc 100644 --- a/templates/repo/migrate/codebase.tmpl +++ b/templates/repo/migrate/codebase.tmpl @@ -83,7 +83,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -99,7 +99,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/git.tmpl b/templates/repo/migrate/git.tmpl index fb6775e38c..ba092a32a0 100644 --- a/templates/repo/migrate/git.tmpl +++ b/templates/repo/migrate/git.tmpl @@ -57,7 +57,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -73,7 +73,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/gitbucket.tmpl b/templates/repo/migrate/gitbucket.tmpl index e9515beeb2..da14d569a8 100644 --- a/templates/repo/migrate/gitbucket.tmpl +++ b/templates/repo/migrate/gitbucket.tmpl @@ -99,7 +99,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -115,7 +115,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/gitea.tmpl b/templates/repo/migrate/gitea.tmpl index f1d4e4f06b..daa1205557 100644 --- a/templates/repo/migrate/gitea.tmpl +++ b/templates/repo/migrate/gitea.tmpl @@ -95,7 +95,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -111,7 +111,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/github.tmpl b/templates/repo/migrate/github.tmpl index c591f2a465..e9f2b11e75 100644 --- a/templates/repo/migrate/github.tmpl +++ b/templates/repo/migrate/github.tmpl @@ -97,7 +97,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -113,7 +113,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/gitlab.tmpl b/templates/repo/migrate/gitlab.tmpl index 65559da152..656b5c50ee 100644 --- a/templates/repo/migrate/gitlab.tmpl +++ b/templates/repo/migrate/gitlab.tmpl @@ -94,7 +94,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -110,7 +110,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/gogs.tmpl b/templates/repo/migrate/gogs.tmpl index 8bc57861ad..78700a7910 100644 --- a/templates/repo/migrate/gogs.tmpl +++ b/templates/repo/migrate/gogs.tmpl @@ -97,7 +97,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -113,7 +113,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/migrate/onedev.tmpl b/templates/repo/migrate/onedev.tmpl index 8463782ae7..50858edd60 100644 --- a/templates/repo/migrate/onedev.tmpl +++ b/templates/repo/migrate/onedev.tmpl @@ -83,7 +83,7 @@ <div class="inline required field {{if .Err_RepoName}}error{{end}}"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" value="{{.repo_name}}" required> + <input id="repo_name" name="repo_name" value="{{.repo_name}}" required maxlength="100"> </div> <div class="inline field"> <label>{{.locale.Tr "repo.visibility"}}</label> @@ -99,7 +99,7 @@ </div> <div class="inline field {{if .Err_Description}}error{{end}}"> <label for="description">{{.locale.Tr "repo.repo_desc"}}</label> - <textarea id="description" name="description">{{.description}}</textarea> + <textarea id="description" name="description" maxlength="2048">{{.description}}</textarea> </div> <div class="inline field"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index efcdaceb37..83a6bc4ba1 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -826,7 +826,7 @@ </div> <div class="required field"> <label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" required> + <input id="repo_name" name="repo_name" required maxlength="100"> </div> <div class="text right actions"> diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index 84d02c0a00..1c12a0a2b7 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -45,7 +45,7 @@ {{.CsrfTokenHtml}} <div class="field {{if .Err_Name}}error{{end}}"> <label for="name">{{.locale.Tr "settings.token_name"}}</label> - <input id="name" name="name" value="{{.name}}" autofocus required> + <input id="name" name="name" value="{{.name}}" autofocus required maxlength="255"> </div> <!--Temporarily disable--> <details class="gt-hidden ui optional field"> diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl index 8a9579c5c5..45f12f22d0 100644 --- a/templates/user/settings/applications_oauth2_edit_form.tmpl +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -36,11 +36,11 @@ {{.CsrfTokenHtml}} <div class="field {{if .Err_AppName}}error{{end}}"> <label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label> - <input id="application-name" value="{{.App.Name}}" name="application_name" required> + <input id="application-name" value="{{.App.Name}}" name="application_name" required maxlength="255"> </div> <div class="field {{if .Err_RedirectURI}}error{{end}}"> <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label> - <input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri"> + <input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri" required> </div> <div class="field ui checkbox {{if .Err_ConfidentialClient}}error{{end}}"> <label>{{.locale.Tr "settings.oauth2_confidential_client"}}</label> diff --git a/templates/user/settings/applications_oauth2_list.tmpl b/templates/user/settings/applications_oauth2_list.tmpl index ad38c60eb9..2e42ed2758 100644 --- a/templates/user/settings/applications_oauth2_list.tmpl +++ b/templates/user/settings/applications_oauth2_list.tmpl @@ -31,7 +31,7 @@ {{.CsrfTokenHtml}} <div class="field {{if .Err_AppName}}error{{end}}"> <label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label> - <input id="application-name" name="application_name" value="{{.application_name}}" required> + <input id="application-name" name="application_name" value="{{.application_name}}" required maxlength="255"> </div> <div class="field {{if .Err_RedirectURI}}error{{end}}"> <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label> diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index f6ea508cc8..0a47c44bd8 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -12,7 +12,7 @@ {{.CsrfTokenHtml}} <div class="field {{if .Err_Title}}error{{end}}"> <label for="title">{{.locale.Tr "settings.key_name"}}</label> - <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required> + <input id="ssh-key-title" name="title" value="{{.title}}" autofocus required maxlength="50"> </div> <div class="field {{if .Err_Content}}error{{end}}"> <label for="content">{{.locale.Tr "settings.key_content"}}</label> diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index dc1bbc84d5..e6ba283a0c 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -12,14 +12,14 @@ <span class="text red gt-hidden" id="name-change-prompt"> {{.locale.Tr "settings.change_username_prompt"}}</span> <span class="text red gt-hidden" id="name-change-redirect-prompt"> {{.locale.Tr "settings.change_username_redirect_prompt"}}</span> </label> - <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}}> + <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}} maxlength="40"> {{if or (not .SignedUser.IsLocal) .IsReverseProxy}} <p class="help text blue">{{$.locale.Tr "settings.password_username_disabled"}}</p> {{end}} </div> <div class="field {{if .Err_FullName}}error{{end}}"> <label for="full_name">{{.locale.Tr "settings.full_name"}}</label> - <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}"> + <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}" maxlength="100"> </div> <div class="field {{if .Err_Email}}error{{end}}"> <label for="email">{{.locale.Tr "email"}}</label> @@ -33,15 +33,15 @@ </div> <div class="field {{if .Err_Description}}error{{end}}"> <label for="description">{{$.locale.Tr "user.user_bio"}}</label> - <textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}">{{.SignedUser.Description}}</textarea> + <textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}" maxlength="255">{{.SignedUser.Description}}</textarea> </div> <div class="field {{if .Err_Website}}error{{end}}"> <label for="website">{{.locale.Tr "settings.website"}}</label> - <input id="website" name="website" type="url" value="{{.SignedUser.Website}}"> + <input id="website" name="website" type="url" value="{{.SignedUser.Website}}" maxlength="255"> </div> <div class="field"> <label for="location">{{.locale.Tr "settings.location"}}</label> - <input id="location" name="location" value="{{.SignedUser.Location}}"> + <input id="location" name="location" value="{{.SignedUser.Location}}" maxlength="50"> </div> <div class="ui divider"></div> |