{{define "body"}}
<div class="page-header">
    <div class="row">
        <h2>{{.BodyTitle}}</h2>
    </div>
</div>
<form class="form-horizontal" action="/{{.Data.StoreTitle}}/edit" method="post">
    <input type="hidden" name="token" value="{{.Token}}">
    <div class="form-group">
        <label class="col-form-label" for="title">Title</label>
        <input class="form-control input-sm" type="text" id="title" name="title" value="{{.Data.Title}}" spellcheck="false" disabled>
    </div>
    <div class="form-group">
        <label class="col-form-label" for="markdown">Markdown</label>
        <textarea class="form-control input-sm md-text" id="markdown" name="markdown" rows="30" spellcheck="false">{{.Data.Markdown}}</textarea>
    </div>
    <div class="form-group">
        <div class="custom-control custom-radio">
            <input type="radio" id="perm1" name="perm" value="1" class="custom-control-input" {{if eq .Data.Perm 1}}checked=""{{end}}>
            <label class="custom-control-label" for="perm1">Public</label>
        </div>
        <div class="custom-control custom-radio">
            <input type="radio" id="perm2" name="perm" value="2" class="custom-control-input" {{if eq .Data.Perm 2}}checked=""{{end}}>
            <label class="custom-control-label" for="perm2">Private</label>
        </div>
    </div>
    <button class="btn btn-sm btn-primary" type="submit">Update</button>
    <a href="/{{.Data.StoreTitle}}" class="btn btn-sm btn-primary">Back</a>
</form>
{{end}}
