Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM for continue button on signature page #161

Open
plocket opened this issue Nov 22, 2021 · 1 comment
Open

DOM for continue button on signature page #161

plocket opened this issue Nov 22, 2021 · 1 comment
Labels
add field Stuff relating to adding new fields to the test interviews

Comments

@plocket
Copy link
Collaborator

plocket commented Nov 22, 2021

That's changed with Bootstrap 5 as well. This selector used to work:

`div.form-actions a.dasigsave`

Now the DOM looks like this:

<fieldset class="da-button-set d-none d-sm-block da-signature">
  <legend class="visually-hidden">Press one of the following buttons:</legend>
  <div class="dasigbuttons mt-3">
    <a href="#" role="button" class="btn btn-primary btn-da dasigsave">Continue</a>
    <a href="#" role="button" class="btn btn-warning btn-da dasigclear">Clear</a>
  </div>
</fieldset>

prettified with https://allcodes.11zon.com/en/html-beautify/html-prettify.php

@plocket plocket added the add field Stuff relating to adding new fields to the test interviews label Nov 22, 2021
@plocket
Copy link
Collaborator Author

plocket commented Nov 22, 2021

Changing selector to just .dasigsave

We have to get more specific than that because there are two continue buttons on the page.

The selectors we want: btn btn-primary btn-da dasigsave

The selectors we DON'T want: btn btn-sm btn-primary dasignav-right dasignavbutton dasigsave

btn-da is the only one that's unique to our desired button, but that doesn't seem stable. The other is also a button for da, so it might easily get that class added.

DOM for the UNwanted button inside the same parent as our DOM shown above:

<div class="dasigshowsmallblock dasigheader d-block d-sm-none" id="dasigheader" style="
    display: block !important;
">
    <div class="dasiginnerheader">
        <a href="#" role="button" class="btn btn-sm btn-warning dasignav-left dasignavbutton dasigclear">Clear</a>
        <a href="#" role="button" class="btn btn-sm btn-primary dasignav-right dasignavbutton dasigsave" style="
    display: block;
    height: 100px;
    width: 100px;
    visibility: visible;
">Continue</a>
        <div id="dasigtitle" class="dasigtitle">Signature 1</div>
    </div>
</div>

What currently looks most reliable is to use the fieldset tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add field Stuff relating to adding new fields to the test interviews
Projects
None yet
Development

No branches or pull requests

1 participant