grocy/js/viewjs/login.js
Katharina Bogad 2a7fbbecf8 Fix bugs
2021-06-24 22:18:19 +02:00

21 lines
381 B
JavaScript

function loginView(Grocy, scope = null)
{
var $scope = $;
if (scope != null)
{
$scope = (selector) => $(scope).find(selector);
}
$scope('#username').focus();
if (Grocy.GetUriParam('invalid') === 'true')
{
$scope('#login-error').text(__t('Invalid credentials, please try again'));
$scope('#login-error').removeClass('d-none');
}
}
window.loginView = loginView