Added localization for login screen

This commit is contained in:
Niko 2022-02-15 19:39:42 +01:00
parent 873bfbf6fe
commit a38470a561
3 changed files with 26 additions and 9 deletions

View File

@ -1,5 +1,9 @@
<?php
$strings = [
'form' => [
'login' => 'Log in',
'email' => 'E-mail',
'password' => 'Password',
],
];

View File

@ -1,5 +1,9 @@
<?php
$strings = [
'form' => [
'login' => 'Iniciar sesión',
'email' => 'E-mail',
'password' => 'Contraseña',
],
];

View File

@ -2,16 +2,25 @@
<?php if_session_redirect_app() ?>
<?php tpl('pub.header', [
'title' => ' s(login)',
'scripts' => ['base']
'scripts' => ['base'],
'styles' => ['base', 'app'],
]) ?>
<form id="login" onsubmit="return loginAction(event)">
<span><?php s('email') ?></span>
<input type="email" name="email" /><br>
<span><?php s('password') ?></span>
<input type="password" name="password" /><br>
<input type="submit" value="<?php s('log_in') ?>" />
<main class="flex">
<form id="login" class="center"
onsubmit="return loginAction(event)">
<div class="form-item">
<span><?php s('form.email') ?></span><br>
<input type="email" name="email" />
</div>
<div class="form-item">
<span><?php s('form.password') ?></span><br>
<input type="password" name="password" />
</div>
<input type="submit" value="<?php s('form.login') ?>" />
</form>
</main>
<script>
function loginAction(e) {
const payload = {