summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorDavid Jimenez <dvejmz@users.noreply.github.com>2021-10-27 05:33:22 +0100
committerGitHub <noreply@github.com>2021-10-27 12:33:22 +0800
commita462fcaac8825e992c99e3298a28c649682c0c92 (patch)
tree3d32e1762dbca27486c602f144164eb094aeda90 /templates/repo
parent8f9ac439cae544a7bad3acfba2fdd08f84c75ba8 (diff)
downloadgitea-a462fcaac8825e992c99e3298a28c649682c0c92.tar.gz
gitea-a462fcaac8825e992c99e3298a28c649682c0c92.zip
Show client-side error if wiki page is empty (#17415)
* fix: show client-side error if wiki page is empty Implement a JS, client-side validation workaround for a bug in the upstream editor library SimpleMDE which breaks HTML5 client-side validation when a wiki page is submitted. This allows native, client-side errors to appear if the text editor contents are empty. See upstream bugfix report: https://github.com/sparksuite/simplemde-markdown-editor/issues/324 Signed-off-by: David Jimenez <dvejmz@sgfault.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/wiki/new.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
index 6de6ef9a20..d887d8ffae 100644
--- a/templates/repo/wiki/new.tmpl
+++ b/templates/repo/wiki/new.tmpl
@@ -22,7 +22,7 @@
</div>
<div class="field content" data-loading="{{.i18n.Tr "loading"}}">
<div class="ui bottom active tab" data-tab="write">
- <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.RepoLink}}" required>{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea>
+ <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.APIURL}}/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea>
</div>
</div>
<div class="field">