Skip to content

Commit

Permalink
fix copy paste errors and get by id
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Nov 28, 2024
1 parent 31a93d0 commit 97adfec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% if analytics_tracking_id is not empty %}
gtag('event', 'IdP', {
'event_category': 'hub',
'event_label': 'choice',
'event_label': 'choice-disabled',
'value': id
});
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions modules/material/themes/material/mfa/new-backup-codes.twig
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
document.getElementById('copyBtn').addEventListener('click', function() {
copyCodesToClipboard(this);
});
document.querySelector('input[type="checkbox"]').addEventListener('change', function(e) {
document.getElementById('checkbox').addEventListener('change', function(e) {
contBtn = document.querySelector('button[name="continue"]');
contBtn.disabled = !e.checked;
});
Expand Down Expand Up @@ -159,7 +159,7 @@

<div layout-children="row" class="fill-parent">
<label class="mdl-checkbox mdl-js-checkbox" flex>
<input type="checkbox" class="mdl-checkbox__input">
<input id="checkbox" type="checkbox" class="mdl-checkbox__input">
<span class="mdl-checkbox__label">{{ '{mfa:new_codes_saved}'|trans }}</span>
</label>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
return input;
}
document.querySelector('.mdl-button.mdl-color-text--red').addEventListener('click', verifyWebAuthn);
document.getElementById('showBtn').addEventListener('click', verifyWebAuthn);
document.querySelector('body').addEventListener{'load', verifyWebAuthn};
});
</script>
Expand Down Expand Up @@ -121,6 +121,7 @@
<span flex></span>
<!-- used type=button to avoid form submission on click -->
<button
id="showBtn"
type="button"
class="mdl-button mdl-color-text--red {{ error_message is empty ? 'hide' : 'show' }}"
>
Expand Down
7 changes: 3 additions & 4 deletions modules/material/themes/material/profilereview/review.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
}
document.querySelector('body').addEventListener('load', prettifyDates)
document.querySelectorA("mdl-button mdl-button--colored").addEventListener('click', function(e) {
e.preventDefault()
document.querySelector('button').click()
document.getElementById('launch').addEventListener('click', function(e) {
document.getElementsByName('continue').click()
});
});
</script>
Expand Down Expand Up @@ -124,7 +123,7 @@
</section>

<section layout-children="row" child-spacing="end" class="fill-parent margin">
<a href="{{ profile_url }}" target="_blank" rel="noopener"
<a id="launch" href="{{ profile_url }}" target="_blank" rel="noopener"
class="mdl-button mdl-button--colored" layout-children="row">
{{ '{review:button_update}'|trans }} <i class="material-icons">launch</i>
</a>
Expand Down

0 comments on commit 97adfec

Please sign in to comment.