Refactor i18n, add templating for resource app
This commit is contained in:
parent
e4f17ca315
commit
161ea7fe0c
21 changed files with 432 additions and 152 deletions
10
templates/idp/base.gohtml
Normal file
10
templates/idp/base.gohtml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ define "base" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><title>{{ .Title }}</title></head>
|
||||
<body>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ template "content" . }}
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
24
templates/idp/consent.gohtml
Normal file
24
templates/idp/consent.gohtml
Normal file
|
@ -0,0 +1,24 @@
|
|||
{{ define "content" }}
|
||||
<p>{{ .IntroConsentRequested }}</p>
|
||||
{{ if .client.LogoURI }}
|
||||
<p>
|
||||
<img src="{{ .client.LogoURI }}" alt="{{ .client.ClientName }}"/>
|
||||
</p>
|
||||
{{ end }}
|
||||
<p>{{ .IntroMoreInformation }}</p>
|
||||
<form method="post">
|
||||
{{ .csrfField }}
|
||||
<ul>
|
||||
{{ range .requestedScope }}
|
||||
<li>{{ .Label }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<input type="checkbox" name="consent" id="consent" value="true"/> <label
|
||||
for="consent">{{ .LabelConsent }}</label>
|
||||
</p>
|
||||
|
||||
<button type="submit">{{ .LabelSubmit }}</button>
|
||||
</form>
|
||||
{{ end }}
|
12
templates/idp/login.gohtml
Normal file
12
templates/idp/login.gohtml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ define "content" }}
|
||||
<form method="post">
|
||||
{{ .csrfField }}
|
||||
{{ if .errors.Email }}<p>{{ .errors.Email }}</p>{{ end }}
|
||||
<label for="email">{{ .LabelEmail }}</label>
|
||||
<input type="text" id="email" name="email" value="{{ .Email }}"/><br/>
|
||||
{{ if .errors.Password }}<p>{{ .errors.Password }}</p>{{ end }}
|
||||
<label for="password">{{ .LabelPassword }}</label>
|
||||
<input type="password" id="password" name="password" value=""/><br/>
|
||||
<button type="submit">{{ .LabelLogin }}</button>
|
||||
</form>
|
||||
{{ end }}
|
Reference in a new issue