diff --git a/ruqqus/assets/js/all_js.js b/ruqqus/assets/js/all_js.js index 494569b85..62e141f0e 100644 --- a/ruqqus/assets/js/all_js.js +++ b/ruqqus/assets/js/all_js.js @@ -641,45 +641,6 @@ $('#password-register').on('input', function () { }); -// Check username length, special chars - -$('#username-register').on('input', function () { - - var charCount = document.getElementById("username-register").value; - var id = document.getElementById("usernameHelpRegister"); - var successID = document.getElementById("usernameHelpSuccess"); - - var ruqqusAPI = '/api/is_available/' + charCount; - - if (charCount.length >= 3) { - - $.getJSON(ruqqusAPI, function(result) { - $.each(result, function(i, field) { - if (field == false) { - id.innerHTML = 'Username already taken :('; - } - }); - }); - - } - - if (!/[^a-zA-Z0-9_\-$]/.test(charCount)) { - // Change alert text - id.innerHTML = 'Username is a-okay!'; - - if (charCount.length < 3) { - id.innerHTML = 'Username must be at least 3 characters long.'; - } - else if (charCount.length > 25) { - id.innerHTML = 'Username must be 25 characters or less.'; - } - } - else { - id.innerHTML = 'No special characters or spaces allowed.'; - }; - -}); - // Search Icon // Change navbar search icon when form is in focus, active states diff --git a/ruqqus/templates/sign_up.html b/ruqqus/templates/sign_up.html index 385e0894f..3302ff964 100644 --- a/ruqqus/templates/sign_up.html +++ b/ruqqus/templates/sign_up.html @@ -1,8 +1,47 @@ - + {% include "bootstrap.html" %} + @@ -162,8 +201,6 @@ -{% include "bootstrap.html" %} -