| Marc Kupietz | 97afde4 | 2023-03-04 14:12:46 +0100 | [diff] [blame] | 1 | <h1>Sign up for |
| 2 | <?php echo $SERVICE_ACRONYM;?> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 3 | </h1> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 4 | |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 5 | <form class="row g-3 needs-validation" novalidate action="" method="POST"> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 6 | <!-- Username input --> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 7 | <div class="col-md-4"> |
| 8 | <label class="form-label font-weight-bold" for="form3Example3">Username</label> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 9 | <input pattern="[^\s]{<?php echo $VAL_USER->min_username.','.$VAL_USER->max_username;?>}" required |
| 10 | title="At least 5 not whitespace characters" name="username" type="text" id="form3Example0" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 11 | class="form-control <?php if(isset($error) && $error && !isset($_POST['username'])){echo 'border-danger';}?>" |
| Marc Kupietz | b527e64 | 2023-02-23 10:04:21 +0100 | [diff] [blame] | 12 | placeholder="johndoe" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 13 | value="<?php echo isset($_POST['username']) ? htmlspecialchars($_POST['username']) : '' ?>" /> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 14 | <div class="invalid-feedback"> |
| 15 | Please choose a username with at least 5 not whitespace characters. |
| 16 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 17 | </div> |
| 18 | <!-- 2 column grid layout with text inputs for the first and last names --> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 19 | <div class="col-md-4"> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 20 | <div class="form-outline"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 21 | <label class="form-label font-weight-bold" for="form3Example1">First name</label> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 22 | <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 23 | title="At least 2 not whitespace characters" name="name" type="text" id="form3Example1" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 24 | class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>" |
| Marc Kupietz | b527e64 | 2023-02-23 10:04:21 +0100 | [diff] [blame] | 25 | placeholder="John" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 26 | value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" /> |
| Marc Kupietz | 3186188 | 2023-02-25 08:52:57 +0100 | [diff] [blame] | 27 | <div class="invalid-feedback"> |
| 28 | Please provide a first name with at least 2 characters. |
| 29 | </div> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 30 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 31 | </div> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 32 | <div class="col-md-4"> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 33 | <div class="form-outline"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 34 | <label class="form-label font-weight-bold" for="form3Example2">Last name</label> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 35 | <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 36 | title="At least 2 not whitespace characters" name="last_name" type="text" id="form3Example2" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 37 | class="form-control <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>" |
| 38 | placeholder="Doe" |
| 39 | value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : '' ?>" /> |
| Marc Kupietz | 3186188 | 2023-02-25 08:52:57 +0100 | [diff] [blame] | 40 | <div class="invalid-feedback"> |
| 41 | Please provide a last name with at least 2 characters. |
| 42 | </div> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 43 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 44 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 45 | |
| 46 | <!-- Email input --> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 47 | <div class="form-outline md-6"> |
| 48 | <label class="form-label font-weight-bold" for="form3Example3">Email address</label> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 49 | <input required name="email" type="email" id="form3Example3" |
| 50 | class="form-control <?php if(isset($error) && $error && !isset($_POST['email'])){echo 'border-danger';}?>" |
| 51 | placeholder="myemail@example.com" |
| 52 | value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>" /> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 53 | <div class="invalid-feedback"> |
| 54 | Please provide a valid email address. |
| 55 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 56 | </div> |
| 57 | |
| Marc Kupietz | a19f307 | 2023-02-25 14:16:40 +0100 | [diff] [blame] | 58 | <div class="form-outline md-6"> |
| 59 | <label class="form-label font-weight-bold" for="organization">Institution / Organization</label> |
| 60 | <input required name="organization" type="text" id="organization" |
| 61 | class="form-control <?php if(isset($error) && $error && !isset($_POST['organization'])){echo 'border-danger';}?>" |
| 62 | placeholder="Example University" |
| 63 | pattern=".{3,64}" |
| 64 | value="<?php echo isset($_POST['organization']) ? htmlspecialchars($_POST['organization']) : '' ?>" /> |
| 65 | <div class="invalid-feedback"> |
| 66 | Please indicate the institution or organization you are affiliated with. |
| 67 | </div> |
| 68 | </div> |
| 69 | |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 70 | <!-- Password input --> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 71 | <div id="password-div" class="col-md-8"> |
| 72 | <label class="form-label font-weight-bold" for="pw1">Password</label> |
| Marc Kupietz | 484ec8e | 2023-02-25 11:23:07 +0100 | [diff] [blame] | 73 | <input required |
| 74 | title="Combination of upper and lowercase letters, numbers, punctuation, and special symbols" name="password" type="password" id="pw1" |
| 75 | class="form-control" |
| Marc Kupietz | 3186188 | 2023-02-25 08:52:57 +0100 | [diff] [blame] | 76 | placeholder="********" oninput="check_password_match()" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 77 | value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : '' ?>" /> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 78 | </div> |
| 79 | <div class="col-md-4"> |
| Marc Kupietz | ccf34bb | 2023-03-06 21:28:45 +0100 | [diff] [blame] | 80 | <label class="form-label" for="pwqinfo">Rating</label> |
| 81 | <input class="form-control" type="text" id="pwqinfo" readonly /> |
| 82 | </div> |
| 83 | |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 84 | <div class="col-md-12"> |
| Marc Kupietz | 21fa9bb | 2023-02-24 19:44:16 +0100 | [diff] [blame] | 85 | <div class="progress mt-2"> |
| 86 | <div class="progress-bar bg-danger" role="progressbar" id="pwqbar" aria-valuenow="0" aria-valuemin="0" |
| 87 | aria-valuemax="100"></div> |
| 88 | </div> |
| Marc Kupietz | ccf34bb | 2023-03-06 21:28:45 +0100 | [diff] [blame] | 89 | |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 90 | </div> |
| Marc Kupietz | 21fa9bb | 2023-02-24 19:44:16 +0100 | [diff] [blame] | 91 | <!-- |
| 92 | <div class="form-group"> |
| 93 | <label for="pwqinfo">Password rating</label> |
| 94 | <input class="form-control" type="text" name="pwqinfo" id="pwqinfo" readonly> |
| 95 | <div class="progress mt-2"> |
| 96 | <div class="progress-bar bg-danger" role="progressbar" id="pwqbar2" aria-valuenow="0" aria-valuemin="0" |
| 97 | aria-valuemax="100"></div> |
| 98 | </div> |
| 99 | </div> |
| 100 | --> |
| Marc Kupietz | 484ec8e | 2023-02-25 11:23:07 +0100 | [diff] [blame] | 101 | <!-- Password confirmation input --> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 102 | <div id="pwconfirm" class="form-outline col-md-8"> |
| 103 | <label class="form-label font-weight-bold" for="pw2">Confirm your Password</label> |
| Marc Kupietz | 484ec8e | 2023-02-25 11:23:07 +0100 | [diff] [blame] | 104 | <input required |
| 105 | name="password_confirm" type="password" id="pw2" |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 106 | class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>" |
| Marc Kupietz | 5ad53e7 | 2023-02-25 14:49:49 +0100 | [diff] [blame] | 107 | placeholder="********" oninput="check_password_match()" |
| 108 | value="<?php echo isset($_POST['password_confirm']) ? htmlspecialchars($_POST['password_confirm']) : '' ?>" /> |
| Marc Kupietz | 3186188 | 2023-02-25 08:52:57 +0100 | [diff] [blame] | 109 | <div class="invalid-feedback"> |
| 110 | Passwords do not match. |
| 111 | </div> |
| 112 | </div> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 113 | <div class="form-outline mb-3"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 114 | <label class="form-label font-weight-bold" for="eula">End User License Agreement</label> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 115 | <div class="form-group form-check"> |
| Marc Kupietz | 5ad53e7 | 2023-02-25 14:49:49 +0100 | [diff] [blame] | 116 | <input type="checkbox" class="form-check-input" name="eula" id="eula" required |
| 117 | title="You need to agree to the EULA in order to proceed" |
| 118 | <?php echo isset($_POST['eula']) ? 'checked' : '' ?> |
| 119 | value="eula"> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 120 | <label class="form-check-label" for="eula">I have read and agree to to the |
| 121 | <?php echo $SERVICE_NAME; ?> <a |
| 122 | href="https://www2.ids-mannheim.de/cosmas2/projekt/register/license_agreement.html">End User License |
| 123 | Agreement</a> and will use |
| 124 | <?php echo $SERVICE_NAME; ?> only for academic and non-commercial purposes. |
| 125 | </label> |
| 126 | <div class="invalid-feedback"> |
| 127 | You need to agree to the EULA in order to proceed. |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 131 | <div class="form-outline mb-3"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 132 | <label class="form-label font-weight-bold" for="privacy_policy">Privacy Policy</label> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 133 | <div class="form-group form-check"> |
| 134 | <input type="checkbox" class="form-check-input" name="privacy_policy" id="privacy_policy" required |
| Marc Kupietz | 5ad53e7 | 2023-02-25 14:49:49 +0100 | [diff] [blame] | 135 | title="You need to agree to the privacy policy in order to proceed" |
| 136 | <?php echo isset($_POST['privacy_policy']) ? 'checked' : '' ?> |
| 137 | value="privacy_policy"> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 138 | <label class="form-check-label" for="privacy_policy">I have read and agree |
| 139 | to to the |
| 140 | <?php echo $SERVICE_NAME; ?> <a |
| 141 | href="https://www2.ids-mannheim.de/cosmas2/web-app/datenschutz.html">Privacy Policy</a>. |
| 142 | </label> |
| 143 | <div class="invalid-feedback"> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 144 | You need to agree to the privacy policy in order to proceed. |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 145 | </div> |
| 146 | </div> |
| 147 | </div> |
| Marc Kupietz | 493198f | 2023-03-04 14:59:16 +0100 | [diff] [blame] | 148 | |
| 149 | <?php if($CAPTCHA_LENGTH > 0): ?> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 150 | <!--captcha here--> |
| 151 | <div class="form-outline mb-3"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 152 | <label class="form-label font-weight-bold" for="form3Example4">Captcha</label> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 153 | <div class="container mb-2 offset-md-2"> |
| 154 | <img id="captcha" src="<?php echo $BASE_URL.'/captcha.php?token='.$_SESSION['captcha_token']; ?>" /> |
| 155 | <div id="reload_captcha"> |
| Marc Kupietz | 675b565 | 2023-02-25 13:09:47 +0100 | [diff] [blame] | 156 | <button id="reload" class="btn btn-outline-info" type="button"> <span class="glyphicon glyphicon-refresh" |
| 157 | aria-hidden="true"></span></button> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 158 | </div> |
| 159 | </div> |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 160 | <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required |
| Marc Kupietz | a3f3fdb | 2023-03-04 18:13:26 +0100 | [diff] [blame] | 161 | title="Please fill the captcha. It has <?php echo $CAPTCHA_LENGTH; ?> characters" name="captcha" type="text" id="form3Example6" |
| Marc Kupietz | 7743428 | 2023-02-24 12:04:47 +0100 | [diff] [blame] | 162 | class="form-control" placeholder="Type what you see on the image above" /> |
| Marc Kupietz | 5ad53e7 | 2023-02-25 14:49:49 +0100 | [diff] [blame] | 163 | <div class="invalid-feedback"> |
| 164 | Type what you see on the image above. |
| 165 | </div> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 166 | </div> |
| Marc Kupietz | 493198f | 2023-03-04 14:59:16 +0100 | [diff] [blame] | 167 | <?php endif; ?> |
| matheusfillipe | abd513e | 2021-05-11 03:29:11 -0300 | [diff] [blame] | 168 | |
| 169 | <!-- Submit button --> |
| 170 | <button name="type" value="register" type="submit" class="btn btn-primary float-right btn-md">Sign up</button> |
| 171 | |
| 172 | </form> |
| Marc Kupietz | 1f2b2e9 | 2023-02-24 13:04:40 +0100 | [diff] [blame] | 173 | </div> |