mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
22 lines
769 B
JavaScript
22 lines
769 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');
|
|
initDisclaimer('.btn-openid-connect', '#openidConnectForm');
|
|
initDisclaimer('.btn-saml', '#samlForm');
|
|
initDisclaimer('.sign-up-button', '#sign-up-form');
|
|
initDisclaimer('.forgot-password-submit', '#forgot-password-form');
|
|
initDisclaimer('.invitation-submit', '#invitation-form');
|
|
}());
|