prevent freemarker exceptions from unavailable properties

closes #30220

Signed-off-by: Niko Köbler <niko@n-k.de>
This commit is contained in:
Niko Köbler 2024-06-06 08:13:53 +02:00 committed by Alexander Schwartz
parent f00c2f3eb0
commit 28fd38d13d
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
${msg("recovery-code-config-header")} ${msg("recovery-code-config-header")}
<#elseif section = "form"> <#elseif section = "form">
<!-- warning --> <!-- warning -->
<div class="pf-c-alert pf-m-warning pf-m-inline ${properties.kcRecoveryCodesWarning}" aria-label="Warning alert"> <div class="pf-c-alert pf-m-warning pf-m-inline ${properties.kcRecoveryCodesWarning!}" aria-label="Warning alert">
<div class="pf-c-alert__icon"> <div class="pf-c-alert__icon">
<i class="pficon-warning-triangle-o" aria-hidden="true"></i> <i class="pficon-warning-triangle-o" aria-hidden="true"></i>
</div> </div>
@ -26,7 +26,7 @@
</ol> </ol>
<!-- actions --> <!-- actions -->
<div class="${properties.kcRecoveryCodesActions}"> <div class="${properties.kcRecoveryCodesActions!}">
<button id="printRecoveryCodes" class="pf-c-button pf-m-link" type="button"> <button id="printRecoveryCodes" class="pf-c-button pf-m-link" type="button">
<i class="pficon-print"></i> ${msg("recovery-codes-print")} <i class="pficon-print"></i> ${msg("recovery-codes-print")}
</button> </button>
@ -40,7 +40,7 @@
<!-- confirmation checkbox --> <!-- confirmation checkbox -->
<div class="${properties.kcFormOptionsClass!}"> <div class="${properties.kcFormOptionsClass!}">
<input class="${properties.kcCheckInputClass}" type="checkbox" id="kcRecoveryCodesConfirmationCheck" name="kcRecoveryCodesConfirmationCheck" <input class="${properties.kcCheckInputClass!}" type="checkbox" id="kcRecoveryCodesConfirmationCheck" name="kcRecoveryCodesConfirmationCheck"
onchange="document.getElementById('saveRecoveryAuthnCodesBtn').disabled = !this.checked;" onchange="document.getElementById('saveRecoveryAuthnCodesBtn').disabled = !this.checked;"
/> />
<label for="kcRecoveryCodesConfirmationCheck">${msg("recovery-codes-confirmation-message")}</label> <label for="kcRecoveryCodesConfirmationCheck">${msg("recovery-codes-confirmation-message")}</label>

View file

@ -5,7 +5,7 @@
<#if section = "title"> <#if section = "title">
title title
<#elseif section = "header"> <#elseif section = "header">
<span class="${properties.kcWebAuthnKeyIcon}"></span> <span class="${properties.kcWebAuthnKeyIcon!}"></span>
${kcSanitize(msg("webauthn-registration-title"))?no_esc} ${kcSanitize(msg("webauthn-registration-title"))?no_esc}
<#elseif section = "form"> <#elseif section = "form">