From ceb8d8106c10e2182466ca5816d022ef2a07878b Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 18 Apr 2024 10:28:17 +0200 Subject: [PATCH] fix(theme): fix password update theme (#101) - fix password update theme - chore(consortia): change rc env to use main tag for init container --- .../environments/centralidp/values-rc.yaml | 4 +- .../environments/sharedidp/values-rc.yaml | 2 +- .../login/resources/css/Main.css | 11 +++- .../catenax-shared/login/resources/js/Main.js | 4 +- .../login/resources/js/passwordVisibility.js | 20 ++++++ .../catenax-shared/login/test-update.html | 66 ++++++++++++------- 6 files changed, 77 insertions(+), 30 deletions(-) create mode 100644 import/keycloak-themes/catenax-shared/login/resources/js/passwordVisibility.js diff --git a/consortia/environments/centralidp/values-rc.yaml b/consortia/environments/centralidp/values-rc.yaml index 2b1bda15..461ef994 100644 --- a/consortia/environments/centralidp/values-rc.yaml +++ b/consortia/environments/centralidp/values-rc.yaml @@ -22,7 +22,7 @@ keycloak: proxy: edge initContainers: - name: import - image: docker.io/tractusx/portal-iam-consortia:v3.0.0-rc.1 + image: docker.io/tractusx/portal-iam-consortia:main imagePullPolicy: Always command: - sh @@ -69,7 +69,7 @@ seeding: enabled: false initContainers: - name: init-cx-central - image: docker.io/tractusx/portal-iam-consortia:v3.0.0-rc.1 + image: docker.io/tractusx/portal-iam-consortia:main imagePullPolicy: Always command: - sh diff --git a/consortia/environments/sharedidp/values-rc.yaml b/consortia/environments/sharedidp/values-rc.yaml index c9913760..07523395 100644 --- a/consortia/environments/sharedidp/values-rc.yaml +++ b/consortia/environments/sharedidp/values-rc.yaml @@ -41,7 +41,7 @@ keycloak: mountPath: "/secrets" initContainers: - name: import - image: docker.io/tractusx/portal-iam-consortia:v3.0.0-rc.1 + image: docker.io/tractusx/portal-iam-consortia:main imagePullPolicy: Always command: - sh diff --git a/import/keycloak-themes/catenax-shared/login/resources/css/Main.css b/import/keycloak-themes/catenax-shared/login/resources/css/Main.css index 8a5a8d13..51a2aa64 100644 --- a/import/keycloak-themes/catenax-shared/login/resources/css/Main.css +++ b/import/keycloak-themes/catenax-shared/login/resources/css/Main.css @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -189,6 +189,15 @@ form a { padding: 16px 0 0 0; } +button[aria-controls="password-new"], +button[aria-controls="password-confirm"] { + display: none; +} + +#logout-sessions { + width: 20px; +} + .password-policy-hint { text-align: left; line-height: 20px; diff --git a/import/keycloak-themes/catenax-shared/login/resources/js/Main.js b/import/keycloak-themes/catenax-shared/login/resources/js/Main.js index bac950f6..7b7bc4f0 100644 --- a/import/keycloak-themes/catenax-shared/login/resources/js/Main.js +++ b/import/keycloak-themes/catenax-shared/login/resources/js/Main.js @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -374,7 +374,7 @@ class FormUpdate extends Form { } this.button = document.querySelectorAll('input[type=submit]')[0] this.button.setAttribute('disabled', '') - State.getInstance().setUsername(document.getElementById('username').value) + State.getInstance().setUsername(document.getElementById('username')?.value ?? '') Validator.getInstance() return this } diff --git a/import/keycloak-themes/catenax-shared/login/resources/js/passwordVisibility.js b/import/keycloak-themes/catenax-shared/login/resources/js/passwordVisibility.js new file mode 100644 index 00000000..160df1c7 --- /dev/null +++ b/import/keycloak-themes/catenax-shared/login/resources/js/passwordVisibility.js @@ -0,0 +1,20 @@ +/******************************************************************************** + * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +// intentionally empty to prevent loading 404 error diff --git a/import/keycloak-themes/catenax-shared/login/test-update.html b/import/keycloak-themes/catenax-shared/login/test-update.html index 2e1466cd..2252c1c6 100644 --- a/import/keycloak-themes/catenax-shared/login/test-update.html +++ b/import/keycloak-themes/catenax-shared/login/test-update.html @@ -1,5 +1,5 @@ - + - - Sign in to Martins Global Enterprise - + Sign in to Test Company @@ -35,7 +33,7 @@
Martins Global Enterprise
+ class="">Test Company
@@ -55,20 +53,24 @@

Update password You need to change your password to activate your account.

-
- - - +
- +
+ + +
@@ -78,27 +80,43 @@

Update password
- +
+ + +
-
-
-
-
+
+
+
+ +
+
+
+ +