diff options
author | Gerben <gerben@treora.com> | 2018-03-23 15:10:42 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-03-23 22:10:42 +0800 |
commit | 2dc6f15eca007105fb6c3972265e6da53696bdf1 (patch) | |
tree | 2775c7b19061663edf401d3af1adc87bb86c5453 /templates/repo | |
parent | e64aa18dc97f2cf25bc642c7d987a4a3bed494ac (diff) | |
download | gitea-2dc6f15eca007105fb6c3972265e6da53696bdf1.tar.gz gitea-2dc6f15eca007105fb6c3972265e6da53696bdf1.zip |
Don't warn users about *every* dirty form (#3707)
The choice regarding which forms should or should not trigger a warning
is subjective. I tried to be consistent and not warn about forms that:
- run an action, rather than edit data: search, send an email.
- delete data: a warning about losing data would be confusing
Note that forms on sign-in pages were already ignored (using a selector,
rather than an explicit class on the form element).
Fixes #3698.
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits_table.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/search.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/search.tmpl | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 4503976e0e..8a8e2c369e 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -5,7 +5,7 @@ </div> <div class="ten wide right aligned column"> {{if .PageIsCommits}} - <form action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search"> + <form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search"> <div class="ui tiny search input"> <input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> </div> diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 91db56c98f..9f705c967c 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -10,7 +10,7 @@ </div> {{if .RepoSearchEnabled}} <div class="ui repo-search"> - <form class="ui form" action="{{.RepoLink}}/search" method="get"> + <form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get"> <div class="field"> <div class="ui action input"> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}"> diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl index 5e0f9a562d..522bced3cf 100644 --- a/templates/repo/issue/search.tmpl +++ b/templates/repo/issue/search.tmpl @@ -1,4 +1,4 @@ -<form class="ui form"> +<form class="ui form ignore-dirty"> <div class="ui fluid action input"> <input type="hidden" name="type" value="{{$.ViewType}}"/> <input type="hidden" name="state" value="{{$.State}}"/> diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl index 3ddc5de86c..c4413e7884 100644 --- a/templates/repo/search.tmpl +++ b/templates/repo/search.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}} <div class="ui container"> <div class="ui repo-search"> - <form class="ui form" method="get"> + <form class="ui form ignore-dirty" method="get"> <div class="ui fluid action input"> <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}"> <button class="ui button" type="submit"> |