Tasks/templates/edit.html

45 lines
2.0 KiB
HTML
Raw Normal View History

2015-11-22 10:59:39 +08:00
{{template "_head.html" .}}
2015-11-18 00:58:03 +08:00
<div class="timeline">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="newNoteLabel"><span class="glyphicon glyphicon-pencil"></span> Edit Task</h4>
2016-02-05 02:36:00 +08:00
</div>
{{ $categories := .Categories }}
{{range $index, $task := .Tasks}}
2015-11-18 00:58:03 +08:00
<div class="modal-body">
<form action="/update/" method="POST">
<div class="form-group">
2016-02-05 02:36:00 +08:00
<input type="text" name="title" value="{{ $task.Title}}" class="form-control" id="add-note-title" placeholder="Title" style="border:none;border-bottom:1px solid gray; box-shadow:none;">
2015-11-18 00:58:03 +08:00
</div>
<div class="form-group">
2015-11-20 11:48:49 +08:00
<textarea class="form-control" name="content" id="add-note-content" placeholder="Content"
2016-02-05 02:36:00 +08:00
rows="10" style="border:none;border-bottom:1px solid gray; box-shadow:none;">{{ $task.Content}}</textarea>
2015-11-18 00:58:03 +08:00
<input type="text" name="id" value="{{.Id}}" class="hidden" />
Priority:
<input type="radio" name="priority" value="3" {{if eq .Priority "3"}} checked="checked" {{end}} /> High
<input type="radio" name="priority" value="2" {{if eq .Priority "2"}} checked="checked" {{end}} /> Medium
<input type="radio" name="priority" value="1" {{if eq .Priority "1"}} checked="checked" {{end}} /> Low
2015-11-18 00:58:03 +08:00
</div>
2016-02-05 02:36:00 +08:00
Category:
<select name="category">
<option>---</option>
{{range $cat := $categories}}
<option value="{{$cat}}" {{if eq $cat $task.Category}} selected="true" {{end}}> {{$cat}} </option>
{{end}}
</select>
2015-11-18 00:58:03 +08:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<input type="submit" text="submit" class="btn btn-default" />
</div>
</form>
</div>
</div>
2015-11-22 10:59:39 +08:00
{{end}}
2016-01-23 21:47:34 +08:00
{{template "_footer.html"}}
2015-11-18 00:58:03 +08:00
</body>
2015-11-13 17:04:42 +08:00
</html>