Skip to content
Permalink
Browse files

fix bug with duplicate names for password fields, for sign up and reset.

  • Loading branch information
tpokorra committed Nov 19, 2019
1 parent 21a89b7 commit 4e9ac45bc199bbf8b028733a08840823c46b3bb6
Showing with 8 additions and 8 deletions.
  1. +4 −4 js-client/index.html
  2. +4 −4 js-client/src/lib/app.js
@@ -131,8 +131,8 @@ <h4>{sales_caption}</h4>
<input type="email" class="form-control" placeholder="{email}" id="txtEmailSignUp" autofocus required>
<input type="text" class="form-control" placeholder="{firstname}" id="txtFirstName" required>
<input type="text" class="form-control" placeholder="{lastname}" id="txtLastName" required>
<input type="password" class="form-control" placeholder="{newpasswd1}" id="txtPassword1" required>
<input type="password" class="form-control" placeholder="{newpasswd2}" id="txtPassword2" required>
<input type="password" class="form-control" placeholder="{newpasswd1}" id="txtPasswordSignUp1" required>
<input type="password" class="form-control" placeholder="{newpasswd2}" id="txtPasswordSignUp2" required>
<button id="btnSignUpSubmit" class="btn btn-lg btn-primary btn-block" type="submit">{signup}</button>
</form>
</div> <!-- /container -->
@@ -141,8 +141,8 @@ <h4>{sales_caption}</h4>
<!-- Begin of setting new password -->
<div id="setNewPwd" class="container" style="display:none">
<form class="form-signin">
<input type="password" class="form-control" placeholder="{newpasswd1}" id="txtPassword1" autofocus>
<input type="password" class="form-control" placeholder="{newpasswd2}" id="txtPassword2">
<input type="password" class="form-control" placeholder="{newpasswd1}" id="txtPasswordReset1" autofocus>
<input type="password" class="form-control" placeholder="{newpasswd2}" id="txtPasswordReset2">
<button id="btnSetNewPwd" class="btn btn-lg btn-primary btn-block" type="submit">{setNewPassword}</button>
</form>
</div> <!-- /container -->
@@ -68,8 +68,8 @@ function resetPassword() {
$("#setNewPwd").show();
$("#btnSetNewPwd").click(function(e) {
e.preventDefault();
pwd1=$("#txtPassword1").val();
pwd2=$("#txtPassword2").val();
pwd1=$("#txtPasswordReset1").val();
pwd2=$("#txtPasswordReset2").val();
if (pwd1 != pwd2) {
display_message(i18next.t('login.passwords_dont_match'), "fail");
} else {
@@ -167,8 +167,8 @@ function requestSignUp() {
userEmail=$("#txtEmailSignUp").val();
firstName=$("#txtFirstName").val();
lastName=$("#txtLastName").val();
pwd1=$("#txtPassword1").val();
pwd2=$("#txtPassword2").val();
pwd1=$("#txtPasswordSignUp1").val();
pwd2=$("#txtPasswordSignUp2").val();
if ((pwd1 != pwd2) || (pwd1 == '')) {
display_message(i18next.t('login.passwords_dont_match'), "fail");
} else if (userEmail == "" || userEmail.indexOf('@') == -1) {

0 comments on commit 4e9ac45

Please sign in to comment.
You can’t perform that action at this time.