Pracownia.Programowania/views/write.html
2018-12-11 20:42:44 +01:00

29 lines
905 B
HTML

{{ 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">
<input type="hidden" name="id" value="{{.Id}}"/>
<div class="form-group">
<label for="title">Tytul</label>
<input type="text" class="form-control" id="title" name="title" value ="{{.Title}}"/>
</div>
<div class="form-group">
<label for="content">Content</label>
<textarea name="content" id="content">{{.Content}}</textarea>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<div class="col-xs-4">
{{ if.Id }}
<a href="deletePost?id={{.Id}}">Delete</a>
{{ end }}
</div>
</div>
{{ template "footer" }}
{{ end }}