add missing id attributes on button elements (#39910)

* add missing id attributes on button elements

this makes automated ui-tests easier to fetch the proper button element, despite label-text

closes #39909

Signed-off-by: Niko Köbler <niko@n-k.de>

* Review

Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>

---------

Signed-off-by: Niko Köbler <niko@n-k.de>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
This commit is contained in:
Niko Köbler
2025-06-03 12:03:29 +02:00
committed by GitHub
parent d656aa747f
commit 814e66ef7b
4 changed files with 7 additions and 7 deletions

View File

@@ -29,9 +29,9 @@
<p class="delete-account-text">${msg("finalDeletionConfirmation")}</p>
<@buttons.actionGroup>
<@buttons.button label="doConfirmDelete" class=["kcButtonPrimaryClass"]/>
<@buttons.button id="kc-submit" label="doConfirmDelete" class=["kcButtonPrimaryClass"]/>
<#if triggered_from_aia>
<@buttons.button name="cancel-aia" label="doCancel" class=["kcButtonSecondaryClass"]/>
<@buttons.button id="kc-cancel" name="cancel-aia" label="doCancel" class=["kcButtonSecondaryClass"]/>
</#if>
</@buttons.actionGroup>
</form>

View File

@@ -65,7 +65,7 @@
<button class="${properties.kcFormPasswordVisibilityButtonClass}" type="button" aria-label="${msg('showPassword')}"
aria-controls="${name}" data-password-toggle
data-icon-show="fa-eye fas" data-icon-hide="fa-eye-slash fas"
data-label-show="${msg('showPassword')}" data-label-hide="${msg('hidePassword')}">
data-label-show="${msg('showPassword')}" data-label-hide="${msg('hidePassword')}" id="${name}-show-password">
<i class="fa-eye fas" aria-hidden="true"></i>
</button>
</div>

View File

@@ -18,10 +18,10 @@
<@buttons.actionGroup horizontal=true>
<#if isAppInitiatedAction??>
<@buttons.button label="doSubmit" class=["kcButtonPrimaryClass"]/>
<@buttons.button label="doCancel" name="cancel-aia" class=["kcButtonSecondaryClass"]/>
<@buttons.button id="kc-submit" label="doSubmit" class=["kcButtonPrimaryClass"]/>
<@buttons.button id="kc-cancel" label="doCancel" name="cancel-aia" class=["kcButtonSecondaryClass"]/>
<#else>
<@buttons.button label="doSubmit" class=["kcButtonPrimaryClass", "kcButtonBlockClass"]/>
<@buttons.button id="kc-submit" label="doSubmit" class=["kcButtonPrimaryClass", "kcButtonBlockClass"]/>
</#if>
</@buttons.actionGroup>
</form>

View File

@@ -42,7 +42,7 @@
</script>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<button class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!} g-recaptcha"
data-sitekey="${recaptchaSiteKey}" data-callback="onSubmitRecaptcha" data-action="${recaptchaAction}" type="submit">
data-sitekey="${recaptchaSiteKey}" data-callback="onSubmitRecaptcha" data-action="${recaptchaAction}" type="submit" id="kc-submit">
${msg("doRegister")}
</button>
</div>