Skip to content

Commit

Permalink
add condition to the remember-me checkbox for updaters when the token…
Browse files Browse the repository at this point in the history
…-table does not exist yet

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Aug 29, 2024
1 parent 57206b2 commit f31ee2e
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
// show template to enter code
UI::view('login/enter2fa.html.twig', [
'pagetitle' => lng('login.2fa'),
'remember_me' => (Settings::Get('panel.db_version') >= 202407200) ? true : false,
'message' => $message
]);
} elseif ($action == '2fa_verify') {
Expand Down
4 changes: 2 additions & 2 deletions lng/ca.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,8 @@
]
],
'message' => [
'norecipients' => 'No s\'ha enviat cap correu electrònic perquè no hi ha destinataris a la base de dades'
'norecipients' => 'No s\'ha enviat cap correu electrònic perquè no hi ha destinataris a la base de dades',
'success' => 'Missatge enviat correctament als destinataris de %s',
],
'mysql' => [
'databasename' => 'Usuari/Nom de la base de dades',
Expand Down Expand Up @@ -2169,7 +2170,6 @@
'issuer' => 'Emissor'
],
'success' => [
'messages_success' => 'Missatge enviat correctament als destinataris de %s',
'success' => 'Informació',
'clickheretocontinue' => 'Feu clic aquí per a continuar',
'settingssaved' => 'La configuració s\'ha guardat correctament.',
Expand Down
2 changes: 1 addition & 1 deletion lng/cz.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@
],
'message' => [
'norecipients' => 'Nebyl odeslán žádný e-mail, protože v databázi nejsou žádní příjemci',
'success' => 'Zpráva byla úspěšně odeslána příjemcům %s',
],
'mysql' => [
'databasename' => 'Uživatel/Jméno databáze',
Expand Down Expand Up @@ -2273,7 +2274,6 @@
'issuer' => 'Vydavatel',
],
'success' => [
'messages_success' => 'Zpráva byla úspěšně odeslána příjemcům %s',
'success' => 'Informace',
'clickheretocontinue' => 'Klikněte zde pro pokračování',
'settingssaved' => 'Nastavení bylo úspěšně uloženo.',
Expand Down
2 changes: 1 addition & 1 deletion lng/de.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@
],
'message' => [
'norecipients' => 'Es wurde keine E-Mail versendet, da sich keine Empfänger in der Datenbank befinden',
'success' => 'Nachricht erfolgreich an "%s" Empfänger gesendet',
],
'mysql' => [
'databasename' => 'Benutzer-/Datenbankname',
Expand Down Expand Up @@ -2139,7 +2140,6 @@
'dmarc_entry' => 'DMARC-Eintrag für alle Domains',
],
'success' => [
'messages_success' => 'Nachricht erfolgreich an "%s" Empfänger gesendet',
'success' => 'Information',
'clickheretocontinue' => 'Hier klicken, um fortzufahren',
'settingssaved' => 'Die Einstellungen wurden erfolgreich gespeichert.',
Expand Down
2 changes: 1 addition & 1 deletion lng/en.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@
],
'message' => [
'norecipients' => 'No e-mail has been sent because there are no recipients in the database',
'success' => 'Successfully sent message to %s recipients',
],
'mysql' => [
'databasename' => 'User/Database name',
Expand Down Expand Up @@ -2273,7 +2274,6 @@
'issuer' => 'Issuer',
],
'success' => [
'messages_success' => 'Successfully sent message to %s recipients',
'success' => 'Information',
'clickheretocontinue' => 'Click here to continue',
'settingssaved' => 'The settings have been successfully saved.',
Expand Down
4 changes: 2 additions & 2 deletions lng/es.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,8 @@
]
],
'message' => [
'norecipients' => 'No se ha enviado ningún correo electrónico porque no hay destinatarios en la base de datos'
'norecipients' => 'No se ha enviado ningún correo electrónico porque no hay destinatarios en la base de datos',
'success' => 'Mensaje enviado correctamente a los destinatarios de %s',
],
'mysql' => [
'databasename' => 'Usuario/Nombre de la base de datos',
Expand Down Expand Up @@ -2152,7 +2153,6 @@
'issuer' => 'Emisor'
],
'success' => [
'messages_success' => 'Mensaje enviado correctamente a los destinatarios de %s',
'success' => 'Información',
'clickheretocontinue' => 'Haga clic aquí para continuar',
'settingssaved' => 'La configuración se ha guardado correctamente.',
Expand Down
4 changes: 1 addition & 3 deletions lng/fr.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
],
'message' => [
'norecipients' => 'Aucun e-mail n\'a été envoyé car il n\'existe aucun destinataire dans la base de données',
'success' => 'Le message a été envoyé aux destinataires "%s"',
],
'mysql' => [
'databasename' => 'Nom de la base de données',
Expand Down Expand Up @@ -749,9 +750,6 @@
'description' => 'Les administrateurs / revendeurs peuvent réinitialiser leurs mots de passe et il sera envoyé à leurs propres adresses e-mails',
],
],
'success' => [
'messages_success' => 'Le message a été envoyé aux destinataires "%s"',
],
'traffic' => [
'month' => 'Mois',
'day' => 'Jour',
Expand Down
2 changes: 1 addition & 1 deletion lng/it.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@
],
'message' => [
'norecipients' => 'Nessuna e-mail è stata inviata perch¸ non ci sono i destinatari nel database',
'success' => 'Inviato correttamente il messaggio a %s recipients',
],
'mysql' => [
'description' => 'Qui puoi creare e modificare il tuo database MySQL<br />Le modifiche sono istantanee e puoi usare subito il database.<br />Nel menù a sinistra trovi phpMyAdmin con cui puoi amministrare il tuo database.<br /><br />Per usare i database nei tuoi script php usa le seguenti impostazioni: (Le parole in <i>corsivo</i> devono essere modificate con quello che hai scritto!)<br />Hostname: <b><SQL_HOST></b><br />Utente: <b><i>Nome database</i></b><br />Password: <b><i>La password che hai scelto</i></b><br />Database: <b><i>Nome database</i></b>',
Expand Down Expand Up @@ -1703,7 +1704,6 @@
'spf_entry' => 'Impostazioni SPF per tutti i domini',
],
'success' => [
'messages_success' => 'Inviato correttamente il messaggio a %s recipients',
'success' => 'Informazioni',
'clickheretocontinue' => 'Clicca qui per continuare',
'settingssaved' => 'Le impostazioni sono state salvate con successo.',
Expand Down
2 changes: 1 addition & 1 deletion lng/nl.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@
],
'message' => [
'norecipients' => 'Er is geen email verstuurd omdat er geen ontvangers in de database zijn',
'success' => 'Bericht verzonden naar ontvangers %s',
],
'mysql' => [
'databasename' => 'gebruiker/database naam',
Expand Down Expand Up @@ -1069,7 +1070,6 @@
'spf_entry' => 'SPF regel voor alle domeinen',
],
'success' => [
'messages_success' => 'Bericht verzonden naar ontvangers %s',
'success' => 'Informatie',
'clickheretocontinue' => 'Klik hier om verder te gaan',
'settingssaved' => 'De instellingen zijn opgeslagen.',
Expand Down
4 changes: 1 addition & 3 deletions lng/pt.lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@
],
'message' => [
'norecipients' => 'Email não enviado porque não tem destinatário no banco de dados',
'success' => 'Mensagens enviadas para %s destinatários com sucesso',
],
'mysql' => [
'description' => 'Aqui você pode criar e alterar seus bancos de dados MySQL.<br />As alterações são instantâneas e podem ser utilizadas imediatamente depois de salvas.<br />No menu do lado esquerdo você pode encontrar a ferramenta phpMyAdmin e com ela facilmente administrar seus bancos de dados.<br /><br />Para usar seu banco de dados com scripts em PHP use as seguintes configurações: (Os dados em <i>italico</i> devem ser substituidos pelo equivalente do banco de dados que você criou!)<br />Hostname: <b><SQL_HOST></b><br />Usuario: <b><i>Nome do banco de dadose</i></b><br />Senha: <b><i>a senha que você escolheu</i></b><br />Banco de dados: <b><i>Nome do banco de dados',
Expand Down Expand Up @@ -880,9 +881,6 @@
'description' => 'Se ativado você pode trocar o cliente de um domínio para administração de outro.<br /><b>Attention:</b> Froxlor não troca nenhum caminho. Isto pode fazer com que domínios parem de funcionar',
],
],
'success' => [
'messages_success' => 'Mensagens enviadas para %s destinatários com sucesso',
],
'traffic' => [
'month' => 'Mês',
'day' => 'Diariamente',
Expand Down
2 changes: 2 additions & 0 deletions templates/Froxlor/login/enter2fa.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
<input class="form-control" type="text" name="2fa_code" id="2fa_code" value="" autocomplete="off" autofocus required/>
</div>

{% if remember_me %}
<div class="mb-3">
<div class="form-check form-switch">
<input type="hidden" name="2fa_remember" value="0"/>
<input class="form-check-input" type="checkbox" id="2fa_remember" name="2fa_remember" value="1">
<label class="form-check-label" for="2fa_remember">{{ lng('login.2faremember') }}</label>
</div>
</div>
{% endif %}

</div>

Expand Down

0 comments on commit f31ee2e

Please sign in to comment.