Skip to content

Commit

Permalink
fix(theme): fix password update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo committed Apr 18, 2024
1 parent b04c5a9 commit f62928d
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
128 changes: 128 additions & 0 deletions import/keycloak-themes/catenax-shared/login/test-update-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!--
- 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
-->

<!DOCTYPE html>
<html class="">

<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<title>Sign in to Martins Company 2</title>
<link href="./resources/css/Main.css" rel="stylesheet" />
<script src="./resources/js/Main.js"></script>
</head>

<body class="">
<div class="">
<div id="kc-header" class="">
<div id="kc-header-wrapper"
class="">Martins Company 2</div>
</div>
<div class="">
<header class="">
<h1 id="kc-page-title"> Update password
</h1>
</header>
<div id="kc-content">
<div id="kc-content-wrapper">

<div class="alert-warning pf-m-warning">
<div class="pf-c-alert__icon">

<span class=""></span>


</div>
<span class="">You need to change your password to activate your account.</span>
</div>

<form id="kc-passwd-update-form" class="" action="https://sharedidp-rc.dev.demo.catena-x.net/auth/realms/idp8/login-actions/required-action?session_code=XNVYRo3eoPdMlMrlUUj0iFVZLPZADBcjxHTnQB9D_68&amp;execution=UPDATE_PASSWORD&amp;client_id=central-idp&amp;tab_id=nqQOPk24W9A" method="post">
<div class="">
<div class="">
<label for="password-new" class="">New Password</label>
</div>
<div class="">
<div class="">
<input type="password" id="password-new" name="password-new" class=""
autofocus autocomplete="new-password"
aria-invalid=""
/>
<button class="" type="button" aria-label="Show password"
aria-controls="password-new" data-password-toggle
data-icon-show="" data-icon-hide=""
data-label-show="Show password" data-label-hide="Hide password">
<i class="" aria-hidden="true"></i>
</button>
</div>

</div>
</div>

<div class="">
<div class="">
<label for="password-confirm" class="">Confirm password</label>
</div>
<div class="">
<div class="">
<input type="password" id="password-confirm" name="password-confirm"
class=""
autocomplete="new-password"
aria-invalid=""
/>
<button class="" type="button" aria-label="Show password"
aria-controls="password-confirm" data-password-toggle
data-icon-show="" data-icon-hide=""
data-label-show="Show password" data-label-hide="Hide password">
<i class="" aria-hidden="true"></i>
</button>
</div>


</div>
</div>

<div class="">
<div id="kc-form-options" class="">
<div class="">
<div class="checkbox">
<label>
<input type="checkbox" id="logout-sessions" name="logout-sessions" value="on" checked>
Sign out from other devices
</label>
</div>
</div>
</div>

<div id="kc-form-buttons" class="">
<input class=" " type="submit" value="Submit" />
</div>
</div>
</form>
<script type="module" src="./resources/js/passwordVisibility.js"></script>



</div>
</div>

</div>
</div>
</body>
</html>

0 comments on commit f62928d

Please sign in to comment.