js/roundpin-login.js
06fbd764
 /**
  *  Copyright (C) 2021  Double Bastion LLC
  *
  *  This file is part of Roundpin, which is licensed under the
  *  GNU Affero General Public License Version 3.0. The license terms
  *  are detailed in the "LICENSE.txt" file located in the root directory.
  */
 
 $(document).ready(function() {
 
  $("#loginname").val("");
  $("#loginname").focus();
  
  $('#loginname').on('input', function() {
     if ($(this).val().length != 0) {
         $("#usernameLabel").css({'display' : 'block', 'opacity' : '1'});
     } else { $("#usernameLabel").css('display','none'); }
  });
 
  $('#password').on('input', function() {
     if ($(this).val().length != 0) {
         $("#passwordLabel").css({'display' : 'block', 'opacity' : '1'}); 
     } else { $("#passwordLabel").css('display','none'); }
  });
 
  if (signupCheck == 'true') {
 
    $("#signintab").on("click", function() {
       $("#signintab").addClass("active");
       $("#signuptab").removeClass("active");
       $("#signinbutton").show();
    });
 
  } else {
 
       $("#signupsec").css("cursor", "default");
       $("#signupsec").attr("href", "");
 
       $("#signuptab").addClass("inactive");
       $("#signuptab").removeClass("underlineHover");
       $("#signuptab").css("cursor", "default");
 
       $("#signintab").on("click", function() {
          $("#signintab").addClass("active");
          $("#signuptab").removeClass("active");
          $("#signinbutton").show();
       });
    }
 
 });