forked from forgejo/forgejo
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
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form class="ui form" style="max-width: 90%">
|
||||
<form class="ui form ignore-dirty" style="max-width: 90%">
|
||||
<div class="ui fluid action input">
|
||||
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
|
||||
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
{{end}}
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
|
||||
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div class="ui input">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue