Skip to content

Commit

Permalink
Merge pull request #96 from theflyingmachine/dev-add_login_spinner
Browse files Browse the repository at this point in the history
Refund notes lable fix
  • Loading branch information
theflyingmachine authored Apr 11, 2023
2 parents c4cc576 + dc901c6 commit 79314c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
11 changes: 10 additions & 1 deletion customer/templates/customer/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@

<span class="text-warning text-center">{{ message }}</span>
<div class="container-login100-form-btn">
<button class="login100-form-btn">
<button class="login100-form-btn" onclick="checkLoginFn(this);">
{% if not request_otp %} Request OTP {% else %} Login {% endif %}
</button>
</div>
Expand All @@ -189,6 +189,15 @@

<div id="dropDownSelect1"></div>

<script>
function checkLoginFn(login) {
//Showing please wait... when login button is clicked
login.disabled = true;
login.innerHTML = '<i class="fa fa-spinner fa-spin"></i> Please Wait…';
login.form.submit();
}
</script>

<!--===============================================================================================-->
<script src="{% static "/customer/login/vendor/jquery/jquery-3.2.1.min.js" %}"></script>
<!--===============================================================================================-->
Expand Down
14 changes: 12 additions & 2 deletions register/templates/register/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,16 +372,26 @@ <h5 class="text-danger">{{ message }}</h5>
placeholder="Enter username">
<input type="password" id="password" class="fadeIn third" name="password"
placeholder="Enter password">
<input type="submit" class="fadeIn fourth" value="Request OTP">
<input type="submit" class="fadeIn fourth" value="Request OTP" onclick="checkLoginFn(this);">
{% else %}
<input type="number" id="otp_password" class="fadeIn third h2 text-center"
name="otp_password"
placeholder="Enter OTP">
<input type="submit" class="fadeIn fourth" value="Login">
<input type="submit" class="fadeIn fourth" value="Login" onclick="checkLoginFn(this);">
{% endif %}
</form>
</div>

<script>
function checkLoginFn(login) {
//Showing please wait... when login button is clicked
login.disabled = true;
login.style.backgroundColor = 'gray';
login.value = 'Please Wait…';
login.form.submit();
}
</script>

<!-- Footer -->
{% include "register/footer.html" %}

0 comments on commit 79314c6

Please sign in to comment.