Skip to content

Commit

Permalink
Merge pull request #164 from usegalaxy-au/dev
Browse files Browse the repository at this point in the history
Fix T&C modal "agree" button at /request/access/*
  • Loading branch information
neoformit authored Oct 18, 2024
2 parents 62b70f4 + 39b9518 commit 509b5e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/home/static/home/css/request-form.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ul.errorlist {
border: 1px solid var(--error);
border-radius: .5rem;
}
[class^="col"] {
.row [class^="col"] {
padding-bottom: 1rem;
}
.blockquote {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h5 class="modal-title"></h5>
.css('padding', '1rem'));
{% endif %}

const isMac = () => navigator.platform.toUpperCase().indexOf('MAC') >= 0;

function agreeTermsAction(el) {
enableTermsInput();
$('#agreeTermsInput').attr('checked', true);
Expand All @@ -92,16 +94,20 @@ <h5 class="modal-title"></h5>
tooltip.disable();
}


function setEventHandler() {
const termsContainer = $('#termsModal iframe').contents().find('body');
if (!termsContainer.length) {
return setTimeout(setEventHandler, 100);
}
if (isMac()) {
return enableAgreeTermsButton();
}
$('#termsModal iframe').contents().on('scroll', (event) => {
const scrollFromEnd = $(termsContainer)[0].scrollHeight
- $('#termsModal iframe').contents().scrollTop()
- $('#termsModal iframe').height();
if (scrollFromEnd < 50) enableAgreeTermsButton();
scrollFromEnd < 50 && enableAgreeTermsButton();
});
termsContainer.css('margin', 'auto');
}
Expand Down
3 changes: 2 additions & 1 deletion webapp/home/templates/home/requests/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ <h1 class="ga-blue"><span class="material-icons">save</span></h1>
<h1 class="ga-blue"><span class="material-icons">key</span></h1>
<div class="card-body">
<p>
Request access to specialised tools AlphaFold 2, FGENESH++ and Cell Ranger
Request access to specialised tools AlphaFold 2, FGENESH++,
Cell Ranger and more...
</p>
</div>

Expand Down

0 comments on commit 509b5e8

Please sign in to comment.