Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit 0e2c740

Browse files
committed
Fixing errors with registration page
- Couldn't select a logo on Firefox, as the touch-swipe blocks the `mouseup` event needed for `click` to work - Issues showing an error with the password when team names are present - The lack of an error text block caused JS errors - The password field would not be marked in red - `$('.el--text')[1]` would refer to the first email field, rather than the password field
1 parent eb06ec4 commit 0e2c740

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/controllers/IndexController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ class="fb-cta cta--yellow">
468468
<label for="">{tr('Password')}</label>
469469
<input autocomplete="off" name="password" type="password" />
470470
</div>
471+
<div id="password_error" class="el--text completely-hidden">
472+
<label for=""></label>
473+
<h6 style="color:red;">{tr('Password is too simple')}</h6>
474+
</div>
471475
{$token_field}
472476
</fieldset>
473477
<div class="fb-choose-emblem">

src/static/js/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ function teamLoginFormError() {
1717
}
1818

1919
function teamPasswordFormError(toosimple) {
20-
$('.el--text')[1].classList.add('form-error');
20+
$passwordError = $('#password_error');
21+
$passwordField = jQuery('input[name="password"]').parent('.el--text');
22+
$passwordField.addClass('form-error');
2123
if (toosimple) {
22-
$('#password_error')[0].classList.remove('completely-hidden');
24+
$passwordError.removeClass('completely-hidden');
2325
}
2426
$('.fb-form input[name="password"]').on('change', function() {
25-
$('.el--text')[1].classList.remove('form-error');
27+
$passwordField.removeClass('form-error');
2628
if (toosimple) {
27-
$('#password_error')[0].classList.add('completely-hidden');
29+
$passwordError.addClass('completely-hidden');
2830
}
2931
});
3032
}

src/static/js/slider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
pager: false,
1414
minSlides: 2,
1515
maxSlides: 5,
16-
moveSlides: 1
16+
moveSlides: 1,
17+
touchEnabled: false
1718
});
1819
}
1920
};

0 commit comments

Comments
 (0)