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

Fixing errors with registration page #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ class="fb-cta cta--yellow">
<label for="">{tr('Password')}</label>
<input autocomplete="off" name="password" type="password" />
</div>
<div id="password_error" class="el--text completely-hidden">
<label for=""></label>
<h6 style="color:red;">{tr('Password is too simple')}</h6>
</div>
{$token_field}
</fieldset>
<div class="fb-choose-emblem">
Expand Down
10 changes: 6 additions & 4 deletions src/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ function teamLoginFormError() {
}

function teamPasswordFormError(toosimple) {
$('.el--text')[1].classList.add('form-error');
var $passwordError = $('#password_error');
var $passwordField = $('input[name="password"]').parent('.el--text');
$passwordField.addClass('form-error');
if (toosimple) {
$('#password_error')[0].classList.remove('completely-hidden');
$passwordError.removeClass('completely-hidden');
}
$('.fb-form input[name="password"]').on('change', function() {
$('.el--text')[1].classList.remove('form-error');
$passwordField.removeClass('form-error');
if (toosimple) {
$('#password_error')[0].classList.add('completely-hidden');
$passwordError.addClass('completely-hidden');
}
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/static/js/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = {
pager: false,
minSlides: 2,
maxSlides: 5,
moveSlides: 1
moveSlides: 1,
touchEnabled: false
});
}
};