mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
21 lines
381 B
JavaScript
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
|