blob: 624a0cf0b2939c9bd75ecdefacd78f865933e0b2 [file] [log] [blame]
Marc Kupietz77434282023-02-24 12:04:47 +01001<h1>Sign up for
2 <?php echo $SERVICE_NAME;?>
3</h1>
matheusfillipeabd513e2021-05-11 03:29:11 -03004
Marc Kupietz1f2b2e92023-02-24 13:04:40 +01005<form class="needs-validation" novalidate action="" method="POST">
matheusfillipeabd513e2021-05-11 03:29:11 -03006 <!-- Username input -->
7 <div class="form-outline mb-3">
8 <label class="form-label font-weight-bold" for="form3Example3">Username*</label>
Marc Kupietz77434282023-02-24 12:04:47 +01009 <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"
matheusfillipeabd513e2021-05-11 03:29:11 -030011 class="form-control <?php if(isset($error) && $error && !isset($_POST['username'])){echo 'border-danger';}?>"
Marc Kupietzb527e642023-02-23 10:04:21 +010012 placeholder="johndoe"
matheusfillipeabd513e2021-05-11 03:29:11 -030013 value="<?php echo isset($_POST['username']) ? htmlspecialchars($_POST['username']) : '' ?>" />
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010014 <div class="invalid-feedback">
15 Please choose a username with at least 5 not whitespace characters.
16 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030017 </div>
18 <!-- 2 column grid layout with text inputs for the first and last names -->
19 <div class="row mb-3">
20 <div class="col">
21 <div class="form-outline">
22 <label class="form-label font-weight-bold" for="form3Example1">First name*</label>
Marc Kupietz77434282023-02-24 12:04:47 +010023 <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010024 title="At least 2 not whitespace characters" name="name" type="text" id="form3Example1"
matheusfillipeabd513e2021-05-11 03:29:11 -030025 class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>"
Marc Kupietzb527e642023-02-23 10:04:21 +010026 placeholder="John"
matheusfillipeabd513e2021-05-11 03:29:11 -030027 value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" />
Marc Kupietz31861882023-02-25 08:52:57 +010028 <div class="invalid-feedback">
29 Please provide a first name with at least 2 characters.
30 </div>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010031 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030032 </div>
33 <div class="col">
34 <div class="form-outline">
35 <label class="form-label font-weight-bold" for="form3Example2">Last name*</label>
Marc Kupietz77434282023-02-24 12:04:47 +010036 <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010037 title="At least 2 not whitespace characters" name="last_name" type="text" id="form3Example2"
matheusfillipeabd513e2021-05-11 03:29:11 -030038 class="form-control <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>"
39 placeholder="Doe"
40 value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : '' ?>" />
Marc Kupietz31861882023-02-25 08:52:57 +010041 <div class="invalid-feedback">
42 Please provide a last name with at least 2 characters.
43 </div>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010044 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030045 </div>
46 </div>
47
48 <!-- Email input -->
49 <div class="form-outline mb-3">
50 <label class="form-label font-weight-bold" for="form3Example3">Email address*</label>
51 <input required name="email" type="email" id="form3Example3"
52 class="form-control <?php if(isset($error) && $error && !isset($_POST['email'])){echo 'border-danger';}?>"
53 placeholder="myemail@example.com"
54 value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>" />
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010055 <div class="invalid-feedback">
56 Please provide a valid email address.
57 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030058 </div>
59
60 <!-- Password input -->
Marc Kupietz484ec8e2023-02-25 11:23:07 +010061 <div id="password-div" class="form-outline mb-3">
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010062 <label class="form-label font-weight-bold" for="pw1">Password*</label>
Marc Kupietz484ec8e2023-02-25 11:23:07 +010063 <input required
64 title="Combination of upper and lowercase letters, numbers, punctuation, and special symbols" name="password" type="password" id="pw1"
65 class="form-control"
Marc Kupietz31861882023-02-25 08:52:57 +010066 placeholder="********" oninput="check_password_match()"
matheusfillipeabd513e2021-05-11 03:29:11 -030067 value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : '' ?>" />
Marc Kupietz21fa9bb2023-02-24 19:44:16 +010068 <div class="progress mt-2">
69 <div class="progress-bar bg-danger" role="progressbar" id="pwqbar" aria-valuenow="0" aria-valuemin="0"
70 aria-valuemax="100"></div>
71 </div>
Marc Kupietz484ec8e2023-02-25 11:23:07 +010072 <input class="form-control" type="text" name="pwqinfo" id="pwqinfo" readonly>
matheusfillipeabd513e2021-05-11 03:29:11 -030073 </div>
Marc Kupietz21fa9bb2023-02-24 19:44:16 +010074 <!--
75 <div class="form-group">
76 <label for="pwqinfo">Password rating</label>
77 <input class="form-control" type="text" name="pwqinfo" id="pwqinfo" readonly>
78 <div class="progress mt-2">
79 <div class="progress-bar bg-danger" role="progressbar" id="pwqbar2" aria-valuenow="0" aria-valuemin="0"
80 aria-valuemax="100"></div>
81 </div>
82 </div>
83 -->
Marc Kupietz484ec8e2023-02-25 11:23:07 +010084 <!-- Password confirmation input -->
Marc Kupietz31861882023-02-25 08:52:57 +010085 <div id="pwconfirm" class="form-outline mb-3">
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010086 <label class="form-label font-weight-bold" for="pw2">Confirm your Password*</label>
Marc Kupietz484ec8e2023-02-25 11:23:07 +010087 <input required
88 name="password_confirm" type="password" id="pw2"
matheusfillipeabd513e2021-05-11 03:29:11 -030089 class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
Marc Kupietz31861882023-02-25 08:52:57 +010090 placeholder="********" oninput="check_password_match()" />
91 <div class="invalid-feedback">
92 Passwords do not match.
93 </div>
94 </div>
95 <hr class="mt-2 mb-3" />
Marc Kupietz77434282023-02-24 12:04:47 +010096 <div class="form-outline mb-3">
97 <label class="form-label font-weight-bold" for="eula">End User License Agreement*</label>
98 <div class="form-group form-check">
99 <input type="checkbox" class="form-check-input" id="eula" required
100 title="You need to agree to the EULA in order to proceed">
101 <label class="form-check-label" for="eula">I have read and agree to to the
102 <?php echo $SERVICE_NAME; ?> <a
103 href="https://www2.ids-mannheim.de/cosmas2/projekt/register/license_agreement.html">End User License
104 Agreement</a> and will use
105 <?php echo $SERVICE_NAME; ?> only for academic and non-commercial purposes.
106 </label>
107 <div class="invalid-feedback">
108 You need to agree to the EULA in order to proceed.
109 </div>
110 </div>
111 </div>
112 <hr class="mt-2 mb-3" />
113 <div class="form-outline mb-3">
114 <label class="form-label font-weight-bold" for="privacy_policy">Privacy Policy*</label>
115 <div class="form-group form-check">
116 <input type="checkbox" class="form-check-input" name="privacy_policy" id="privacy_policy" required
117 title="You need to agree to the privacy policy in order to proceed">
118 <label class="form-check-label" for="privacy_policy">I have read and agree
119 to to the
120 <?php echo $SERVICE_NAME; ?> <a
121 href="https://www2.ids-mannheim.de/cosmas2/web-app/datenschutz.html">Privacy Policy</a>.
122 </label>
123 <div class="invalid-feedback">
Marc Kupietz1f2b2e92023-02-24 13:04:40 +0100124 You need to agree to the privacy policy in order to proceed.
Marc Kupietz77434282023-02-24 12:04:47 +0100125 </div>
126 </div>
127 </div>
128
129 <hr class="mt-2 mb-3" />
matheusfillipeabd513e2021-05-11 03:29:11 -0300130 <!--captcha here-->
131 <div class="form-outline mb-3">
132
133 <label class="form-label font-weight-bold" for="form3Example4">Captcha:</label>
134 <div class="container mb-2 offset-md-2">
135 <img id="captcha" src="<?php echo $BASE_URL.'/captcha.php?token='.$_SESSION['captcha_token']; ?>" />
136 <div id="reload_captcha">
Marc Kupietz77434282023-02-24 12:04:47 +0100137 <button id="reload" class="btn btn-outline-info" type="button"> <span
138 class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
matheusfillipeabd513e2021-05-11 03:29:11 -0300139 </div>
140 </div>
Marc Kupietz77434282023-02-24 12:04:47 +0100141 <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required
142 title="Please fill the captcha. It has 5 characters" name="captcha" type="text" id="form3Example6"
143 class="form-control" placeholder="Type what you see on the image above" />
matheusfillipeabd513e2021-05-11 03:29:11 -0300144 </div>
145
146 <!-- Submit button -->
147 <button name="type" value="register" type="submit" class="btn btn-primary float-right btn-md">Sign up</button>
148
149</form>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +0100150</div>