Remember checkbox values
diff --git a/templates/register.htm b/templates/register.htm
index cd303e3..cf80d4c 100644
--- a/templates/register.htm
+++ b/templates/register.htm
@@ -103,7 +103,8 @@
<input required
name="password_confirm" type="password" id="pw2"
class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
- placeholder="********" oninput="check_password_match()" />
+ placeholder="********" oninput="check_password_match()"
+ value="<?php echo isset($_POST['password_confirm']) ? htmlspecialchars($_POST['password_confirm']) : '' ?>" />
<div class="invalid-feedback">
Passwords do not match.
</div>
@@ -111,8 +112,10 @@
<div class="form-outline mb-3">
<label class="form-label font-weight-bold" for="eula">End User License Agreement</label>
<div class="form-group form-check">
- <input type="checkbox" class="form-check-input" id="eula" required
- title="You need to agree to the EULA in order to proceed">
+ <input type="checkbox" class="form-check-input" name="eula" id="eula" required
+ title="You need to agree to the EULA in order to proceed"
+ <?php echo isset($_POST['eula']) ? 'checked' : '' ?>
+ value="eula">
<label class="form-check-label" for="eula">I have read and agree to to the
<?php echo $SERVICE_NAME; ?> <a
href="https://www2.ids-mannheim.de/cosmas2/projekt/register/license_agreement.html">End User License
@@ -128,7 +131,9 @@
<label class="form-label font-weight-bold" for="privacy_policy">Privacy Policy</label>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" name="privacy_policy" id="privacy_policy" required
- title="You need to agree to the privacy policy in order to proceed">
+ title="You need to agree to the privacy policy in order to proceed"
+ <?php echo isset($_POST['privacy_policy']) ? 'checked' : '' ?>
+ value="privacy_policy">
<label class="form-check-label" for="privacy_policy">I have read and agree
to to the
<?php echo $SERVICE_NAME; ?> <a
@@ -152,6 +157,9 @@
<input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required
title="Please fill the captcha. It has 5 characters" name="captcha" type="text" id="form3Example6"
class="form-control" placeholder="Type what you see on the image above" />
+ <div class="invalid-feedback">
+ Type what you see on the image above.
+ </div>
</div>
<!-- Submit button -->