mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
20 lines
662 B
JavaScript
20 lines
662 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('.sign-up-button', '#sign-up-form');
|
|
initDisclaimer('.forgot-password-submit', '#forgot-password-form');
|
|
initDisclaimer('.invitation-submit', '#invitation-form');
|
|
}());
|