mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
(function() {
|
|
const modal = '#loginDisclaimerModal';
|
|
|
|
function initDisclaimer(button, form) {
|
|
$(button).on('click', function(e) {
|
|
e.preventDefault();
|
|
$(modal).modal('show');
|
|
$(modal).find('[data-action="submit"]').off('click').one('click', function() {
|
|
$(form).submit();
|
|
});
|
|
});
|
|
}
|
|
|
|
initDisclaimer('.log-in-button', '#new_user');
|
|
initDisclaimer('.btn-okta', '#oktaForm');
|
|
initDisclaimer('.btn-azure-ad', '.azureAdForm');
|
|
}());
|