Skip to content

Commit

Permalink
Update rt-html-abs.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ledangtrung committed Dec 18, 2024
1 parent 7ad76d5 commit 00fd0c2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion js/rt-html-abs.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,16 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
});
}) ;
}) ;

// show either openFormBtn or getInstanceBtn
function toggleButtons() {
const ssoValue = document.querySelector('input[type="hidden"][value]').value;
const openFormBtn = document.getElementById('openFormBtn');
const getInstanceBtn = document.getElementById('getInstanceBtn');

openFormBtn.style.display = ssoValue === 'ALL' ? 'inline-block' : 'none';
getInstanceBtn.style.display = ssoValue === '' ? 'inline-block' : 'none';
}

document.addEventListener('DOMContentLoaded', toggleButtons);

0 comments on commit 00fd0c2

Please sign in to comment.