{{define "body"}}
<div class="row">
    <div class="col-xs-4 offset-4">
        <div class="card border-primary mx-auto">
        <div class="card-header">
            <strong>{{.BodyTitle}}</strong>
        </div>
        <div class="card-body">
            <form class="form-horizontal" action="/section/edit/{{.Data.Name}}" method="post">
                <input type="hidden" name="token" value="{{.Token}}">
                <div class="form-group">
                    <label class="col-form-label" for="section">Section</label>
                    <input class="form-control input-sm" type="text" id="section" name="section" value="{{.Data.Name}}" disabled>
                </div>
                <div class="form-group">
                    <label class="col-form-label" for="members">Members</label>
                    <select class="form-control input-sm sections" id="members" name="members" multiple required>
                    {{range $user, $member := .Data.Members}}
                        {{if $member}}
                        <option value="{{$user}}" selected>{{$user}}</option>
                        {{else}}
                        <option value="{{$user}}">{{$user}}</option>
                        {{end}}
                    {{end}}
                    </select>
                </div>
                <button class="btn btn-sm btn-primary" type="submit">Update</button>
                <a href="/{{.Data.Name}}" class="btn btn-sm btn-primary">Back</a>
            </form>
        </div>
        </div>
    </div>
</div>
{{end}}
