summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAlexey Terentyev <axifnx@gmail.com>2018-07-15 03:43:32 +0300
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-07-14 20:43:32 -0400
commitca474af3c655eaaaa01ae9cf26cb583a974da61f (patch)
tree3bb9ebafc9347efee88a573936b0fc5c42097252 /templates
parent8e103d3e76dbd5af562687b64508be62355422d2 (diff)
downloadgitea-ca474af3c655eaaaa01ae9cf26cb583a974da61f.tar.gz
gitea-ca474af3c655eaaaa01ae9cf26cb583a974da61f.zip
Added front-end topics validation (#4316)
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/home.tmpl20
1 files changed, 13 insertions, 7 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index a403ce6611..685351ecb2 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -28,14 +28,16 @@
{{if .IsRepositoryAdmin}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
</div>
{{if .IsRepositoryAdmin}}
- <div class="ui repo-topic-edit grid" id="topic_edit" >
+ <div class="ui repo-topic-edit grid form segment error" id="topic_edit" >
<div class="fourteen wide column">
- <div class="ui fluid multiple search selection dropdown">
- <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
- {{range .Topics}}
- <a class="ui green basic label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important;">{{.Name}}<i class="delete icon"></i></a>
- {{end}}
- <div class="text"></div>
+ <div class="field">
+ <div class="ui fluid multiple search selection dropdown">
+ <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
+ {{range .Topics}}
+ <a class="ui green basic label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important;">{{.Name}}<i class="delete icon"></i></a>
+ {{end}}
+ <div class="text"></div>
+ </div>
</div>
</div>
<div class="one wide column">
@@ -44,6 +46,10 @@
</div>
</div>
{{end}}
+ <div class="hide" id="validate_prompt">
+ <span id="count_prompt">{{.i18n.Tr "repo.topic.count_prompt"}}</span>
+ <span id="format_prompt">{{.i18n.Tr "repo.topic.format_prompt"}}</span>
+ </div>
{{template "repo/sub_menu" .}}
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
{{if and .PullRequestCtx.Allowed .IsViewBranch}}