NexusPro

Sign Up

Create your account today

Sign up with Google Sign up with facebook

or use email
const verifyURL = 'https://nexus-pro.org/verify-email'; $('#signupForm').submit(function(e) { // If this is a Facebook-completion flow, submit the form normally to auth.facebook.complete if (SOCIAL_MODE) { return true; // no e.preventDefault(); let the browser post the form } // Classic email/password flow → use your current AJAX handler e.preventDefault(); var formData = $(this).serialize(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $('#signupbutton').html('Processing ').prop('disabled', true); $.ajax({ url: 'https://nexus-pro.org/data/signup', type: 'POST', data: formData, success: function(response) { if (response.success) { $('#signupbutton').text('Sign up').prop('disabled', false); $('.invalid-feedback').empty().removeClass('error_red'); window.location.href = verifyURL; } if (response.email_error) { iziToast.error({ title: 'error', message: response.email_error, position: 'topLeft', progressBar: false, }); } }, error: function(jqXHR) { if (jqXHR.status === 422) { let errors = jqXHR.responseJSON.errors; $('.invalid-feedback').empty().removeClass('error_red'); $('#signupForm input.is-invalid').removeClass('is-invalid'); for (let field in errors) { $('.' + field + '_field').empty(); $('#signupForm').removeClass('was-validated'); errors[field].forEach(function(msg) { $('.' + field + '_field').text(msg); $('input[name="' + field + '"]').attr('required', '').addClass('is-invalid'); $('.' + field + '_field').addClass('error_red'); }); } } else { $('#signupForm').addClass('was-validated'); } }, complete: function() { $('#signupbutton').text('Sign up').prop('disabled', false); } }); });