summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-06-10 20:35:27 +0200
committerGitHub <noreply@github.com>2020-06-10 14:35:27 -0400
commit628ee1d82ed4afdae8734801be85c57d9a525322 (patch)
tree95e8448278b7cfe0a885e0e9a300cf1963a861f6 /templates
parent42752f3902f53d96598e5329a30374ecc82c9a19 (diff)
downloadgitea-628ee1d82ed4afdae8734801be85c57d9a525322.tar.gz
gitea-628ee1d82ed4afdae8734801be85c57d9a525322.zip
Replace jquery-datetimepicker with native date input (#11684)
This removes the jQuery plugin as well as the associated config options. Native input[type=date] does not require a language attribute as it is localized by default, except for the placeholder attribute for which I currently piggy-back the repo.issues.due_date_form localization option. Implementation should pretty much match GH. Of note is that Safari does not provide a UI for this input type, but I don't think providing one is neccessary and GH did not bother either. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/milestone_new.tmpl15
1 files changed, 5 insertions, 10 deletions
diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl
index ea704c0561..215d4f3c73 100644
--- a/templates/repo/issue/milestone_new.tmpl
+++ b/templates/repo/issue/milestone_new.tmpl
@@ -23,26 +23,21 @@
{{template "base/alert" .}}
<form class="ui form grid" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
- <div class="eleven wide column">
+ <div class="twelve wide column">
<div class="field {{if .Err_Title}}error{{end}}">
<label>{{.i18n.Tr "repo.milestones.title"}}</label>
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required maxlength="50">
</div>
- <div class="field">
- <label>{{.i18n.Tr "repo.milestones.desc"}}</label>
- <textarea name="content">{{.content}}</textarea>
- </div>
- </div>
- <div class="four wide column">
<div class="field {{if .Err_Deadline}}error{{end}}">
<label>
{{.i18n.Tr "repo.milestones.due_date"}}
- <a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
+ <a id="clear-date">{{.i18n.Tr "repo.milestones.clear"}}</a>
</label>
- <input id="deadline" name="deadline" value="{{.deadline}}">
+ <input type="date" id="deadline" name="deadline" value="{{.deadline}}" placeholder="{{.i18n.Tr "repo.issues.due_date_form"}}">
</div>
<div class="field">
- <input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
+ <label>{{.i18n.Tr "repo.milestones.desc"}}</label>
+ <textarea name="content">{{.content}}</textarea>
</div>
</div>
<div class="ui container">