Pracownia.Programowania/views/write.html

29 lines
905 B
HTML
Raw Normal View History

2018-12-10 19:42:28 +01:00
{{ define "write" }}
{{ template "header" }}
<div class="row">
<div class="col-xs-4"></div>
<div class="col-xs-4">
<form action="/savePost" method="POST" role="form">
2018-12-11 20:42:44 +01:00
<input type="hidden" name="id" value="{{.Id}}"/>
2018-12-10 19:42:28 +01:00
<div class="form-group">
<label for="title">Tytul</label>
2018-12-11 20:42:44 +01:00
<input type="text" class="form-control" id="title" name="title" value ="{{.Title}}"/>
2018-12-10 19:42:28 +01:00
</div>
<div class="form-group">
<label for="content">Content</label>
2018-12-11 20:42:44 +01:00
<textarea name="content" id="content">{{.Content}}</textarea>
2018-12-10 19:42:28 +01:00
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<div class="col-xs-4">
2018-12-11 20:42:44 +01:00
{{ if.Id }}
<a href="deletePost?id={{.Id}}">Delete</a>
{{ end }}
2018-12-10 19:42:28 +01:00
</div>
</div>
{{ template "footer" }}
{{ end }}