mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-13 16:07:56 +02:00
1. Fix the "flash message" layout problem for different cases * I am sure most of the users should have ever seen the ugly center-aligned error message with multiple lines. 2. Fix inconsistent "Details" flash message EOL handling, sometimes `\n`, sometimes `<br>` * Now, always use "\n" and use `<pre>` to render 3. Remove SanitizeHTML template func because it is not useful and can be easily abused. * But it is still kept for mail templates, for example: https://github.com/go-gitea/gitea/issues/36049 4. Clarify PostProcessCommitMessage's behavior and add FIXME comment By the way: cleaned up some devtest pages, move embedded style block to CSS file
36 lines
1.7 KiB
Handlebars
36 lines
1.7 KiB
Handlebars
{{template "devtest/devtest-header"}}
|
|
<div class="page-content devtest ui container">
|
|
<div>
|
|
<h1>link-action</h1>
|
|
<div>
|
|
Use "window.fetch" to send a request to backend, the request is defined in an "A" or "BUTTON" element.
|
|
It might be renamed to "link-fetch-action" to match the "form-fetch-action".
|
|
</div>
|
|
<div>
|
|
<button class="link-action" data-url="fetch-action-test?k=1">test action</button>
|
|
<button class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button>
|
|
<button class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button>
|
|
<button class="ui button link-action" data-url="fetch-action-test?k=1" data-modal-confirm-header="confirm header" data-modal-confirm-content="confirm content">test with confirm header</button>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h1>form-fetch-action</h1>
|
|
<div>Use "window.fetch" to send a form request to backend</div>
|
|
<div class="flex-relaxed-list fetch-action-demo-forms">
|
|
<form method="get" action="./fetch-action-test?k=1" class="form-fetch-action">
|
|
<button name="btn">submit get</button>
|
|
</form>
|
|
<form method="post" action="./fetch-action-test?k=1" class="form-fetch-action">
|
|
<div><textarea name="text" rows="3"></textarea></div>
|
|
<div><label><input name="check" type="checkbox"> check</label></div>
|
|
<div><button name="btn">submit post</button></div>
|
|
</form>
|
|
<form method="post" action="./no-such-uri" class="form-fetch-action">
|
|
<div class="tw-py-8">bad action url</div>
|
|
<div><button name="btn">submit test</button></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "devtest/devtest-footer"}}
|