diff --git a/views/profile.pug b/views/profile.pug index 169b539..20f582c 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -28,16 +28,15 @@ block content button#update_preferences_button.btn.btn-primary Update Preferences block extra_scripts + script. - - ( - function isValidEmail(email) { - var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(String(email).toLowerCase()); - } + function isValidEmail(email) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(String(email).toLowerCase()); + } - - function () { + script. + ( function () { $('#update_preferences_button').click((event) => { event.preventDefault(); console.log('Update preferences called');