This commit is contained in:
William 2021-10-10 18:17:57 +02:00
parent 52c15ae1c6
commit 3ab864a4f9
2 changed files with 34 additions and 24 deletions

View File

@ -9,8 +9,8 @@ if ((isset($_POST['username'])) && (isset($_POST['password']))) {
header("Location: index.php");
exit;
} else {
$loginFormError = "Feil påloggingsinformasjon.";
$loginFormError = "Oi da! Noe gikk visst galt, prøv igjen senere.";
$loginFormError = "Feil påloggingsinformasjon. Prøv igjen.";
//$loginFormError = "Noe gikk visst galt, prøv igjen senere.";
}
}
@ -18,25 +18,24 @@ $templateParameters["title"] = "Logg inn";
require_once("template/_header.php");
?>
<h1>Logg inn</h1>
<?=
!empty($loginFormError)
? '<p style="color: #db0000; font-weight: bold;">'.$loginFormError.'</p>'
: '<p>Fyll ut legitimasjonen din for å logge inn.</p>';
?>
<form method="post">
<label for="username">Brukernavn:</label>
<br>
<input type="text" id="username" name="username">
<br>
<label for="password">Passord:</label>
<br>
<input type="password" id="password" name="password">
<br>
<br>
<input type="submit" value="Bekreft">
</form>
<?=!empty($loginFormError) ? '<div class="alert alert-danger"><b>Oi da! </b>'.$loginFormError.'</div>' : NULL ;?>
<h1>Logg inn</h1>
<p>Fyll ut legitimasjonen din for å logge inn.</p>
<form method="post">
<label for="username">Brukernavn:</label>
<br>
<input type="text" id="username" name="username">
<br>
<label for="password">Passord:</label>
<br>
<input type="password" id="password" name="password">
<br>
<br>
<input type="submit" value="Bekreft">
</form>
<?php
require_once("template/_footer.php");

View File

@ -98,21 +98,32 @@ a {
}
.alert {
padding: 12px;
padding: 8px;
margin-bottom: 8px;
border: 1px solid transparent;
border-radius: 2px;
}
.alert-info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
border-color: #62b1bd;
background: linear-gradient(0deg, rgba(167,223,232,1) 0%, rgba(209,236,241,1) 100%);
}
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
border-color: #56bf6e;
background: linear-gradient(0deg, rgba(165,227,180,1) 0%, rgba(212,237,218,1) 100%);
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
border-color: #c8848c;
background: linear-gradient(0deg, rgb(249, 180, 186) 0%, rgb(248, 215, 218) 100%);
}
.alert-warning {
color: #856404;
background: #fff3cd;
border-color: #dfc678;
background: linear-gradient(0deg, rgb(251, 229, 161) 0%, rgb(255, 243, 205) 100%);
}