{{define "body"}}
<div class="page-header">
    <div class="row">
        <div class="col-xs-4 offset-4">
            <div class="card border-primary mx-auto">
                <div class="card-header">
                    <strong>Share {{.Data}}</strong>
                </div>
                <div class="card-body">
                    {{if .Key}}
                    <div class="form-group">
                        <label class="col-form-label" for="key">Key</label>
                        <input class="form-control input-sm" type="text" id="key" value="{{.Key}}" disabled>
                    </div>
                    <a href="/view/{{.Key}}" class="btn btn-sm btn-danger">Share Link</a>
                    <a href="/{{.Data}}/share" class="btn btn-sm btn-primary">Back</a>
                    {{else}}
                    <form class="form-horizontal" action="/{{.Data}}/share" method="post">
                        <input type="hidden" name="token" value="{{.Token}}">
                        <div class="form-group">
                            <label class="col-form-label" for="duration">Lifetime</label>
                            <input class="form-control input-sm" type="text" id="duration" name="duration" autocomplete="off" autofocus required>
                        </div>
                        <div class="form-group">
                            <div class="custom-control custom-radio">
                                <input type="radio" id="mode1" name="mode" value="1" class="custom-control-input" checked="">
                                <label class="custom-control-label" for="mode1">Parse (15m, 10h)</label>
                            </div>
                            <div class="custom-control custom-radio">
                                <input type="radio" id="mode2" name="mode" value="2" class="custom-control-input">
                                <label class="custom-control-label" for="mode2">Day(s) (Numbers only)</label>
                            </div>
                        </div>
                        <button class="btn btn-sm btn-primary" type="submit">Share</button>
                        <a href="/{{.Data}}" class="btn btn-sm btn-primary">Back</a>
                    </form>
                    {{end}}
                </div>
            </div>
        </div>
    </div>
</div>
{{end}}
