{{ template "header.html" . }}

<script src="/static/scripts/approval.js" defer></script>

<div class="container">
    <div class="container-content">
        {{ if .Scopes }}
        <div>{{ .Client }} would like to:</div>
        <ul>
            {{ range $scope := .Scopes }}
            <li>{{ $scope }}</li>
            {{ end }}
        </ul>
        {{ else }}
        <div>{{ .Client }} has not requested any personal information</div>
        {{ end }}
    </div>

    <div class="form-buttons" id="approvalform">
        <form method="post" class="container-form">
            <input type="hidden" name="req" value="{{ .AuthReqID }}" />
            <input type="hidden" name="approval" value="approve">
            <button type="submit" class="button button-accept">
                <span>Grant Access</span>
            </button>
        </form>
        <form method="post" class="container-form">
            <input type="hidden" name="req" value="{{ .AuthReqID }}" />
            <input type="hidden" name="approval" value="rejected">
            <button type="submit" class="button button-cancel">
                <span>Cancel</span>
            </button>
        </form>
    </div>

</div>

{{ template "footer.html" . }}