mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-10 04:15:21 +02:00
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.
This commit is contained in:
parent
e64aa18dc9
commit
2dc6f15eca
15 changed files with 19 additions and 16 deletions
|
@ -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>
|
||||
|
|
|
@ -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"}}">
|
||||
|
|
|
@ -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}}"/>
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue