Log into Your Account | DailyPay (2024)

`); _castle('createRequestToken').then(requestToken => { const hiddenInput = document.createElement('input') hiddenInput.setAttribute('type', 'hidden'); hiddenInput.setAttribute('name', 'castle_request_token'); hiddenInput.setAttribute('value', requestToken); const form = document.getElementById('new_session'); form.appendChild(hiddenInput); }); const validateEmail = (email) => { const 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()); } const getLabel = (inputElem) => $("label[for='" + $(inputElem).attr('id') + "']"); const toggleInputErrorState = (remove, add) => $('input.email').removeClass(remove).addClass(add); const appendErrorField = (errorMessage) => { emailErrorAppended = true; $('.input.email').append(emailErrorElem(errorMessage)); }; const updateErrorText = (errorMessage) => $('#email-error').text(errorMessage); const animateLabel = (target, addOrRemove) => { const label = getLabel(target); label[`${addOrRemove}Class`](activeLabelClass); }; // Since we autofocus this field, make sure label is up if ($('input.email')[0] === document.activeElement) { animateLabel($('input.email'), 'add'); } if (validateEmail(incomingEmail)) { $('input.email').val(incomingEmail); $('.submit').removeClass('disabled').prop('disabled', false); $('#email_login_link_button').removeClass('disabled').prop('disabled', false); } $('input.email').on('input', (e) => { const email = e.target.value; if (validateEmail(email)) { $('.submit').removeClass('disabled').prop('disabled', false); $('#email_login_link_button').removeClass('disabled').prop('disabled', false); $('#session_email').attr('aria-invalid', 'false') $('#email-error').remove(); emailErrorAppended = false; toggleInputErrorState('error', 'success'); } else { $('.submit').addClass('disabled').prop('disabled', true); $('#email_login_link_button').addClass('disabled').prop('disabled', true); $('#session_email').attr('aria-invalid', 'true') const errorText = email ? emailError : requiredError; if (!emailErrorAppended) { toggleInputErrorState('success', 'error'); appendErrorField(errorText); } else { updateErrorText(errorText); } } }); $('input').on('focus', (e) => { animateLabel(e.target, 'add'); }); $('input').on('blur', (e) => { if (!e.target.value) { animateLabel(e.target, 'remove'); } }); $('.submit').on('click', (e) => { if (window.analytics) { window.analytics.track( 'LoginButtonClicked', { isMobileApp: "true", } ); } return true; }); $('.google-button').on('click', (e) => { if (window.analytics) { window.analytics.track( 'OAuthLoginClicked', { oauthMethod: 'google', isMobileApp: "true", } ); } return true; }); $('.apple-button').on('click', (e) => { if (window.analytics) { window.analytics.track( 'OAuthLoginClicked', { oauthMethod: 'apple', isMobileApp: "true", } ); } return true; }); $('.reset-password__input').on('click', (e) => { if (window.analytics) { window.analytics.track( 'ResetPasswordClicked', { isMobileApp: "true", errorsVisible: false } ); } return true; });});// Whenever the email input is updated, updates the login link email hidden input$("#session_email").on('change', (e) => { $("#login_link_email").val(e.target.value);});
Log into Your Account | DailyPay (2024)

References

Top Articles
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 5861

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.