blob: cd303e3884640c99131b2164275f69bbb950d47f [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 Kupietz675b5652023-02-25 13:09:47 +01005<form class="row g-3 needs-validation" novalidate action="" method="POST">
matheusfillipeabd513e2021-05-11 03:29:11 -03006 <!-- Username input -->
Marc Kupietz675b5652023-02-25 13:09:47 +01007 <div class="col-md-4">
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 -->
Marc Kupietz675b5652023-02-25 13:09:47 +010019 <div class="col-md-4">
matheusfillipeabd513e2021-05-11 03:29:11 -030020 <div class="form-outline">
Marc Kupietz675b5652023-02-25 13:09:47 +010021 <label class="form-label font-weight-bold" for="form3Example1">First name</label>
Marc Kupietz77434282023-02-24 12:04:47 +010022 <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010023 title="At least 2 not whitespace characters" name="name" type="text" id="form3Example1"
matheusfillipeabd513e2021-05-11 03:29:11 -030024 class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>"
Marc Kupietzb527e642023-02-23 10:04:21 +010025 placeholder="John"
matheusfillipeabd513e2021-05-11 03:29:11 -030026 value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" />
Marc Kupietz31861882023-02-25 08:52:57 +010027 <div class="invalid-feedback">
28 Please provide a first name with at least 2 characters.
29 </div>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010030 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030031 </div>
Marc Kupietz675b5652023-02-25 13:09:47 +010032 <div class="col-md-4">
matheusfillipeabd513e2021-05-11 03:29:11 -030033 <div class="form-outline">
Marc Kupietz675b5652023-02-25 13:09:47 +010034 <label class="form-label font-weight-bold" for="form3Example2">Last name</label>
Marc Kupietz77434282023-02-24 12:04:47 +010035 <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010036 title="At least 2 not whitespace characters" name="last_name" type="text" id="form3Example2"
matheusfillipeabd513e2021-05-11 03:29:11 -030037 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 Kupietz31861882023-02-25 08:52:57 +010040 <div class="invalid-feedback">
41 Please provide a last name with at least 2 characters.
42 </div>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +010043 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030044 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030045
46 <!-- Email input -->
Marc Kupietz675b5652023-02-25 13:09:47 +010047 <div class="form-outline md-6">
48 <label class="form-label font-weight-bold" for="form3Example3">Email address</label>
matheusfillipeabd513e2021-05-11 03:29:11 -030049 <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 Kupietz1f2b2e92023-02-24 13:04:40 +010053 <div class="invalid-feedback">
54 Please provide a valid email address.
55 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -030056 </div>
57
Marc Kupietza19f3072023-02-25 14:16:40 +010058 <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
matheusfillipeabd513e2021-05-11 03:29:11 -030070 <!-- Password input -->
Marc Kupietz675b5652023-02-25 13:09:47 +010071 <div id="password-div" class="col-md-8">
72 <label class="form-label font-weight-bold" for="pw1">Password</label>
Marc Kupietz484ec8e2023-02-25 11:23:07 +010073 <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 Kupietz31861882023-02-25 08:52:57 +010076 placeholder="********" oninput="check_password_match()"
matheusfillipeabd513e2021-05-11 03:29:11 -030077 value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : '' ?>" />
Marc Kupietz675b5652023-02-25 13:09:47 +010078 </div>
79 <div class="col-md-4">
80 <label for="pwqinfo">Rating</label>
81 <input class="form-control" type="text" name="pwqinfo" id="pwqinfo" readonly>
82 </div>
83 <div class="col-md-12">
Marc Kupietz21fa9bb2023-02-24 19:44:16 +010084 <div class="progress mt-2">
85 <div class="progress-bar bg-danger" role="progressbar" id="pwqbar" aria-valuenow="0" aria-valuemin="0"
86 aria-valuemax="100"></div>
87 </div>
Marc Kupietz675b5652023-02-25 13:09:47 +010088
matheusfillipeabd513e2021-05-11 03:29:11 -030089 </div>
Marc Kupietz21fa9bb2023-02-24 19:44:16 +010090 <!--
91 <div class="form-group">
92 <label for="pwqinfo">Password rating</label>
93 <input class="form-control" type="text" name="pwqinfo" id="pwqinfo" readonly>
94 <div class="progress mt-2">
95 <div class="progress-bar bg-danger" role="progressbar" id="pwqbar2" aria-valuenow="0" aria-valuemin="0"
96 aria-valuemax="100"></div>
97 </div>
98 </div>
99 -->
Marc Kupietz484ec8e2023-02-25 11:23:07 +0100100 <!-- Password confirmation input -->
Marc Kupietz675b5652023-02-25 13:09:47 +0100101 <div id="pwconfirm" class="form-outline col-md-8">
102 <label class="form-label font-weight-bold" for="pw2">Confirm your Password</label>
Marc Kupietz484ec8e2023-02-25 11:23:07 +0100103 <input required
104 name="password_confirm" type="password" id="pw2"
matheusfillipeabd513e2021-05-11 03:29:11 -0300105 class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
Marc Kupietz31861882023-02-25 08:52:57 +0100106 placeholder="********" oninput="check_password_match()" />
107 <div class="invalid-feedback">
108 Passwords do not match.
109 </div>
110 </div>
Marc Kupietz77434282023-02-24 12:04:47 +0100111 <div class="form-outline mb-3">
Marc Kupietz675b5652023-02-25 13:09:47 +0100112 <label class="form-label font-weight-bold" for="eula">End User License Agreement</label>
Marc Kupietz77434282023-02-24 12:04:47 +0100113 <div class="form-group form-check">
114 <input type="checkbox" class="form-check-input" id="eula" required
115 title="You need to agree to the EULA in order to proceed">
116 <label class="form-check-label" for="eula">I have read and agree to to the
117 <?php echo $SERVICE_NAME; ?> <a
118 href="https://www2.ids-mannheim.de/cosmas2/projekt/register/license_agreement.html">End User License
119 Agreement</a> and will use
120 <?php echo $SERVICE_NAME; ?> only for academic and non-commercial purposes.
121 </label>
122 <div class="invalid-feedback">
123 You need to agree to the EULA in order to proceed.
124 </div>
125 </div>
126 </div>
Marc Kupietz77434282023-02-24 12:04:47 +0100127 <div class="form-outline mb-3">
Marc Kupietz675b5652023-02-25 13:09:47 +0100128 <label class="form-label font-weight-bold" for="privacy_policy">Privacy Policy</label>
Marc Kupietz77434282023-02-24 12:04:47 +0100129 <div class="form-group form-check">
130 <input type="checkbox" class="form-check-input" name="privacy_policy" id="privacy_policy" required
131 title="You need to agree to the privacy policy in order to proceed">
132 <label class="form-check-label" for="privacy_policy">I have read and agree
133 to to the
134 <?php echo $SERVICE_NAME; ?> <a
135 href="https://www2.ids-mannheim.de/cosmas2/web-app/datenschutz.html">Privacy Policy</a>.
136 </label>
137 <div class="invalid-feedback">
Marc Kupietz1f2b2e92023-02-24 13:04:40 +0100138 You need to agree to the privacy policy in order to proceed.
Marc Kupietz77434282023-02-24 12:04:47 +0100139 </div>
140 </div>
141 </div>
matheusfillipeabd513e2021-05-11 03:29:11 -0300142 <!--captcha here-->
143 <div class="form-outline mb-3">
Marc Kupietz675b5652023-02-25 13:09:47 +0100144 <label class="form-label font-weight-bold" for="form3Example4">Captcha</label>
matheusfillipeabd513e2021-05-11 03:29:11 -0300145 <div class="container mb-2 offset-md-2">
146 <img id="captcha" src="<?php echo $BASE_URL.'/captcha.php?token='.$_SESSION['captcha_token']; ?>" />
147 <div id="reload_captcha">
Marc Kupietz675b5652023-02-25 13:09:47 +0100148 <button id="reload" class="btn btn-outline-info" type="button"> <span class="glyphicon glyphicon-refresh"
149 aria-hidden="true"></span></button>
matheusfillipeabd513e2021-05-11 03:29:11 -0300150 </div>
151 </div>
Marc Kupietz77434282023-02-24 12:04:47 +0100152 <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required
153 title="Please fill the captcha. It has 5 characters" name="captcha" type="text" id="form3Example6"
154 class="form-control" placeholder="Type what you see on the image above" />
matheusfillipeabd513e2021-05-11 03:29:11 -0300155 </div>
156
157 <!-- Submit button -->
158 <button name="type" value="register" type="submit" class="btn btn-primary float-right btn-md">Sign up</button>
159
160</form>
Marc Kupietz1f2b2e92023-02-24 13:04:40 +0100161</div>