Skip to content

Commit

Permalink
Translation of login templates console 2535 story
Browse files Browse the repository at this point in the history
relates to openshift/oauth-server#71
update README testing instructions.
  • Loading branch information
sg00dwin committed May 5, 2021
1 parent 0035030 commit c129c59
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 25 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The OCP branded templates take advantage of the override mechanism by providing
To test the changes:
1. Scale `cluster-version-operator` to zero pods in the web console by visiting `https://<HOSTNAME>/k8s/ns/openshift-cluster-version/deployments/cluster-version-operator` and using the pod donut controls to set pods to zero. Additionally, pause rollouts via `Actions > Pause Rollouts`.
1. Scale `authentication-operator` to zero pods in the web console by visiting `http://<HOSTNAME>/k8s/ns/openshift-authentication-operator/deployments/authentication-operator` and using the pod donut controls to set pods to zero.
1. Delete the existing branding secret:
```
oc delete secret v4-0-config-system-ocp-branding-template -n openshift-authentication
Expand Down
9 changes: 8 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<head>
<title>{{page.title}} - {{ collection.name }}</title>
<title>
{% if page.layout == 'errors' %}
{% raw %}{{ .Locale.Error }}{% endraw %}
{% else %}
{% raw %}{{ .Locale.LogIn }}{% endraw %}
{% endif %}
- {{ collection.name }}
</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if collection.label == 'okd' %}
Expand Down
18 changes: 9 additions & 9 deletions _layouts/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<header class="pf-c-login__header">
{% include logos.html %}
</header>
<main class="pf-c-login__main">
{% raw %}<main class="pf-c-login__main">
<header class="pf-c-login__main-header">
<h1 class="pf-c-title pf-m-3xl">Log in to your account</h1>
<h1 class="pf-c-title pf-m-3xl">{{ .Locale.LogInToYourAccount }}</h1>
</header>
<div class="pf-c-login__main-body">
{% raw %}<form class="pf-c-form" role="form" action="{{ .Action }}" method="POST">
<form class="pf-c-form" role="form" action="{{ .Action }}" method="POST">
<input type="hidden" name="{{ .Names.Then }}" value="{{ .Values.Then }}">
<input type="hidden" name="{{ .Names.CSRF }}" value="{{ .Values.CSRF }}">
<div class="error-placeholder">
Expand All @@ -28,26 +28,26 @@ <h1 class="pf-c-title pf-m-3xl">Log in to your account</h1>
</div>
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="inputUsername">
<span class="pf-c-form__label-text">Username</span>
<span class="pf-c-form__label-text">{{ .Locale.Username }}</span>
<span class="pf-c-form__label-required" aria-hidden="true">*</span>
</label>
<input type="text" class="pf-c-form-control" id="inputUsername" placeholder="" tabindex="1" autofocus="autofocus" type="text" name="{{ .Names.Username }}" value="{{ .Values.Username }}">
</div>
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="inputPassword">
<span class="pf-c-form__label-text">Password</span>
<span class="pf-c-form__label-text">{{ .Locale.Password }}</span>
<span class="pf-c-form__label-required" aria-hidden="true">*</span>
</label>
<input type="password" class="pf-c-form-control" id="inputPassword" placeholder="" tabindex="2" type="password" name="{{ .Names.Password }}" value="">
</div>
<div class="pf-c-form__group pf-m-action">
<button class="pf-c-button pf-m-primary pf-m-block" type="submit" tabindex="3">Log in</button>
<button class="pf-c-button pf-m-primary pf-m-block" type="submit" tabindex="3">{{ .Locale.LogIn }}</button>
</div>
</form>{% endraw %}
</form>
</div>
</main>
</main>{% endraw %}
<footer class="pf-c-login__footer">
<p>Welcome to {{ collection.name }}.</p>
<p>{% raw %}{{ .Locale.WelcomeTo }}{% endraw %} {{ collection.name }}</p>
</footer>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions _layouts/providers.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@
<main class="pf-c-login__main">
<div class="pf-c-login__main-body">
{% raw %}{{ if eq (len .Providers) 1}}
<a class="pf-c-button pf-m-primary pf-m-block" href="{{ (index .Providers 0).URL }}">Log In</a>
<a class="pf-c-button pf-m-primary pf-m-block" href="{{ (index .Providers 0).URL }}">{{ .Locale.LogIn }}</a>
{{ else }}
<h1 class="pf-c-title pf-m-3xl">Log in with&hellip;</h1>
<h1 class="pf-c-title pf-m-3xl">{{ .Locale.LogInWith }}</h1>
<ul>
{{ $logInWith := .Locale.LogInWith }}
{{ range $provider := .Providers }}
<li class="idp">
<a href="{{$provider.URL}}" class="pf-c-button pf-m-secondary pf-m-block" title="Log in with {{$provider.Name}}">{{$provider.Name}}</a>
<a href="{{$provider.URL}}" class="pf-c-button pf-m-secondary pf-m-block" title="{{ $logInWith }} {{$provider.Name}}">{{$provider.Name}}</a>
</li>
{{ end }}
</ul>
{{ end }}{% endraw %}
</div>
</main>
<footer class="pf-c-login__footer">
{{ content }}
</footer>
</div>
</div>
</body>
Expand Down
1 change: 0 additions & 1 deletion _ocp/errors.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: errors
title: Error
---
1 change: 0 additions & 1 deletion _ocp/login.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: login
title: Login
---
1 change: 0 additions & 1 deletion _ocp/providers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: providers
title: Login
---
1 change: 0 additions & 1 deletion _od/login.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: login
title: Login
---
1 change: 0 additions & 1 deletion _od/providers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: providers
title: Login
---
1 change: 0 additions & 1 deletion _okd/login.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: login
title: Login
---
1 change: 0 additions & 1 deletion _okd/providers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: providers
title: Login
---
1 change: 0 additions & 1 deletion _rosa/login.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: login
title: Login
---
1 change: 0 additions & 1 deletion _rosa/providers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: providers
title: Login
---

0 comments on commit c129c59

Please sign in to comment.