blob: ae604f8cd863562ced90f5706ffd7f63f212ee8c [file] [log] [blame]
matheusfillipeabd513e2021-05-11 03:29:11 -03001<h1>Sign up Now!</h1>
2
3<form action="" method="POST">
4 <!-- Username input -->
5 <div class="form-outline mb-3">
6 <label class="form-label font-weight-bold" for="form3Example3">Username*</label>
7 <input pattern="[^\s]{<?php echo $VAL_USER->min_username.','.$VAL_USER->max_username;?>}" required title="At least 5 not whitespace characteres" name="username" type="text"
8 id="form3Example0"
9 class="form-control <?php if(isset($error) && $error && !isset($_POST['username'])){echo 'border-danger';}?>"
10 placeholder="JhonDoe"
11 value="<?php echo isset($_POST['username']) ? htmlspecialchars($_POST['username']) : '' ?>" />
12 </div>
13 <!-- 2 column grid layout with text inputs for the first and last names -->
14 <div class="row mb-3">
15 <div class="col">
16 <div class="form-outline">
17 <label class="form-label font-weight-bold" for="form3Example1">First name*</label>
18 <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required title="At least 3 not whitespace characteres" name="name"
19 type="text" id="form3Example1"
20 class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>"
21 placeholder="Jhon"
22 value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" />
23 </div>
24 </div>
25 <div class="col">
26 <div class="form-outline">
27 <label class="form-label font-weight-bold" for="form3Example2">Last name*</label>
28 <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required title="At least 3 not whitespace characteres" name="last_name"
29 type="text" id="form3Example2"
30 class="form-control <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>"
31 placeholder="Doe"
32 value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : '' ?>" />
33 </div>
34 </div>
35 </div>
36
37 <!-- Email input -->
38 <div class="form-outline mb-3">
39 <label class="form-label font-weight-bold" for="form3Example3">Email address*</label>
40 <input required name="email" type="email" id="form3Example3"
41 class="form-control <?php if(isset($error) && $error && !isset($_POST['email'])){echo 'border-danger';}?>"
42 placeholder="myemail@example.com"
43 value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>" />
44 </div>
45
46 <!-- Password input -->
47 <div class="form-outline mb-3">
48 <label class="form-label font-weight-bold" for="form3Example4">Password*</label>
49 <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password"
50 type="password" id="form3Example4"
51 class="form-control <?php if(isset($error) && $error && !isset($_POST['password'])){echo 'border-danger';}?>"
52 placeholder="********"
53 value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : '' ?>" />
54 </div>
55 <!-- Password input -->
56 <div class="form-outline mb-3">
57 <label class="form-label font-weight-bold" for="form3Example4">Confirm your Password*</label>
58 <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password_confirm"
59 type="password" id="form3Example5"
60 class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
61 placeholder="********"
62 value="<?php echo isset($_POST['password_confirm']) ? htmlspecialchars($_POST['password_confirm']) : '' ?>" />
63 </div>
64 <!--captcha here-->
65 <div class="form-outline mb-3">
66
67 <label class="form-label font-weight-bold" for="form3Example4">Captcha:</label>
68 <div class="container mb-2 offset-md-2">
69 <img id="captcha" src="<?php echo $BASE_URL.'/captcha.php?token='.$_SESSION['captcha_token']; ?>" />
70 <div id="reload_captcha">
71 <button id="reload" class="btn btn-outline-info" type="button"> <span class="glyphicon glyphicon-refresh"
72 aria-hidden="true"></span></button>
73 </div>
74 </div>
75 <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characteres" name="captcha"
76 type="text" id="form3Example6" class="form-control" placeholder="Type what you see on the image above" />
77 </div>
78
79 <!-- Submit button -->
80 <button name="type" value="register" type="submit" class="btn btn-primary float-right btn-md">Sign up</button>
81
82</form>
83</div>