transmet/templates/pages/add.html

30 lines
1.5 KiB
HTML
Raw Normal View History

2015-05-02 19:28:11 +00:00
{{define "body"}}
<h2 class="form-add-heading">Add Link</h2>
{{template "flashes" .}}
<form class="form-add" action="/add" method="post" role="form" class="container col-form">
2015-05-16 19:48:42 +00:00
<input type="hidden" name="popup" value="{{.popup}}" />
2015-05-02 19:28:11 +00:00
<div class="row">
<div class="col-xs-2">Link:</div><div class="col-xs-10"><input type="text" class="form-control" name="link" placeholder="Link" value="{{.link}}"/></div>
2015-05-05 14:09:10 +00:00
<div class="col-xs-2">Title:</div><div class="col-xs-10"><input type="text" class="form-control" name="title" placeholder="Title" value="{{.title}}"/></div>
2015-05-16 21:29:31 +00:00
<div class="col-xs-2">Category:</div><div class="col-xs-10 add-category-col">
<select class="form-control add-category" name="category" placeholder="Tag">
<option value="-1">-- Pick a Category --</option>
2015-05-12 05:06:28 +00:00
{{range $category := .categories}}
{{template "option-category" $category}}
{{end}}
</select>
</div>
2015-05-16 19:48:42 +00:00
<div class="col-xs-2">Notes:</div><div class="col-xs-10"><textarea class="form-control" name="notes" placeholder="Notes" rows="5" cols="80">{{.description}}</textarea></div>
2015-05-16 21:29:31 +00:00
<div class="col-xs-2"></div><div class="col-xs-10"><input class="add-submit btn btn-lg btn-primary btn-block" type="submit" value="Add Link" /></div>
2015-05-02 19:28:11 +00:00
</div>
</form>
{{end}}
2015-05-12 05:06:28 +00:00
{{define "option-category"}}
<option value="{{.Id}}">{{.ToString}}</option>
{{range $child := .Children}}
2015-05-12 05:06:28 +00:00
{{template "option-category" $child}}
{{end}}
{{end}}