Compare commits

..

No commits in common. "8874df02d269a8f81eb76c647ae03c8454f72498" and "3c3ca3e7a7915b910326c88298609970effcabe5" have entirely different histories.

2 changed files with 5 additions and 4 deletions

View file

@ -259,11 +259,12 @@ func consentHandler(ctx *Context) {
if !ctx.CheckXsrf() {
return
}
consent := ctx.Form("consent")
// TODO html form
approved := true
var err error
rdr := root
if consent == "approve" {
if approved {
rdr, err = ctx.ApproveConsent(data.ConsentChallenge)
if err != nil {
ctx.Error(err)

View file

@ -13,8 +13,8 @@
<form class="form-horizontal" action="/consent" method="post">
<input type="hidden" name="token" value="{{.Token}}">
<input type="hidden" name="consent_challenge" value="{{.Data.ConsentChallenge}}">
<button class="btn btn-sm btn-success" type="submit" name="consent" value="approve">Approve</button>
<button class="btn btn-sm btn-danger" type="submit" name="consent" value="reject">Reject</button>
<button class="btn btn-sm btn-primary" type="submit" name="Approve">Approve</button>
<button class="btn btn-sm btn-primary" type="submit" name="Reject">Reject</button>
</form>
</div>
</div>