| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <?php /** @noinspection PhpVoidFunctionResultUsedInspection */
- /**
- * @var User $user
- * @var UserAddress $user_address
- * @var UserAddress $secondary_user_address
- */
- $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
- ?>
- <div class="container mt-3 py-4">
- <h2><?=htmlspecialchars(__("Register"))?></h2>
- <p><?=htmlspecialchars(__("Become a tester and earn £10 per test which should last no longer than 8 minutes!"))?></p>
- <p>
- <?=sprintf(htmlspecialchars(__("If you want more information on our security policy, please call us on %s (mobile call rate).")), PHONE)?>
- </p>
- <hr />
- <form method="post">
- <div class="row">
- <div class="col-lg-8 offset-lg-2">
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="title"><?=htmlspecialchars(__("Title"))?></label>
- <div class="col-sm">
- <select class="form-control w-auto" name="title" id="title" required>
- <option value=""><?=htmlspecialchars(__("Select title"))?></option>
- <?php
- foreach(User::titles() as $value => $display) {
- $selected = ($user->title === $value) ? "selected" : "";
- ?>
- <option value="<?=htmlspecialchars($value)?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
- <?php
- }
- ?>
- </select>
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="first-name"><?=htmlspecialchars(__("First Name"))?></label>
- <div class="col-sm">
- <input class="form-control w-auto" type="text" name="first_name" id="first-name" placeholder="<?=htmlspecialchars(__("Enter first name"))?>" value="<?=htmlspecialchars($user->first_name)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="last-name"><?=htmlspecialchars(__("Last Name"))?></label>
- <div class="col-sm">
- <input class="form-control w-auto" type="text" name="last_name" id="last-name" placeholder="<?=htmlspecialchars(__("Enter last name"))?>" value="<?=htmlspecialchars($user->last_name)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="gender"><?=htmlspecialchars(__("Gender"))?></label>
- <div class="col-sm">
- <select class="form-control w-auto" name="gender" id="gender" required>
- <option value=""><?=htmlspecialchars(__("Select gender"))?></option>
- <?php
- foreach(User::genders() as $gender_name => $display) {
- $value = $gender_name[0];
- $selected = ($user->gender === $value) ? "selected" : "";
- ?>
- <option value="<?=htmlspecialchars($value)?>" <?=$selected?>><?=htmlspecialchars($display)?></option>
- <?php
- }
- ?>
- </select>
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="email"><?=htmlspecialchars(__("Email Address"))?></label>
- <div class="col-sm">
- <input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" value="<?=htmlspecialchars($user->email)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="phone"><?=htmlspecialchars(__("Mobile Number"))?></label>
- <div class="col-sm">
- <input class="form-control w-auto" type="tel" name="phone" id="phone" placeholder="<?=htmlspecialchars(__("Enter mobile number"))?>" value="<?=htmlspecialchars($user->phone)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="password"><?=htmlspecialchars(__("Password"))?></label>
- <div class="col-sm">
- <input class="form-control" type="password" name="password" id="password" placeholder="<?=htmlspecialchars(__("Enter password"))?>" autocomplete="new-password" required />
- <small class="text-muted form-text"><?=sprintf(htmlspecialchars(__("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
- '<span data-length-requirement>', '</span>',
- '<span data-lowercase-requirement>', '</span>',
- '<span data-uppercase-requirement>', '</span>',
- '<span data-number-requirement>', '</span>',
- '<span data-special-requirement>', '</span>'
- )?></small>
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="password-confirm"><?=htmlspecialchars(__("Confirm Password"))?></label>
- <div class="col-sm">
- <input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(__("Confirm password"))?>" autocomplete="new-password" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="date-of-birth"><?=htmlspecialchars(__("Date of Birth"))?></label>
- <div class="col-sm">
- <input class="form-control" type="date" name="date_of_birth" id="date-of-birth" value="<?=htmlspecialchars($user->date_of_birth)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="postal-code"><?=htmlspecialchars(__("Postal Code"))?></label>
- <div class="col-sm">
- <input class="form-control w-auto" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(__("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
- </div>
- </div>
- <div class="row mb-1">
- <label class="col-sm-4 col-form-label" for="secondary-postal-code"><?=htmlspecialchars(__("Secondary Postal Code"))?></label>
- <div class="col-sm">
- <input class="form-control w-auto" type="text" name="secondary_postal_code" id="secondary-postal-code" placeholder="<?=htmlspecialchars(__("Enter postal code"))?>" value="<?=htmlspecialchars($secondary_user_address->postal_code)?>" />
- </div>
- </div>
- <div class="row mb-3">
- <label class="col-sm-4 col-form-label" for="country"><?=htmlspecialchars(__("Country"))?></label>
- <div class="col-sm">
- <select class="form-control w-auto" name="country" id="country" required>
- <?=Form::renderCountryOptions($user_address->country)?>
- </select>
- </div>
- </div>
- <div class="row mb-1">
- <div class="col-sm offset-sm-4">
- <label>
- <input type="checkbox" value="1" name="terms_accepted" /> <?=sprintf(htmlspecialchars(__("I agree to and have read the %sTerms and Conditions%s and %sPrivacy Policy%s")),
- '<a href="/terms-and-conditions" target="_blank">', '</a>',
- '<a href="/privacy-policy" target="_blank">', '</a>'
- )?>
- </label>
- </div>
- </div>
- <div class="row mb-1">
- <div class="col-sm offset-sm-4 align-self-center">
- <label><input type="checkbox" name="newsletter_content" id="newsletter-consent" value="1" <?=$newsletter_consent_checked?> /> <?=sprintf(htmlspecialchars(__("Opt-in to newsletters about %s")), APP_NAME)?></label>
- </div>
- </div>
- <div class="row">
- <div class="col-sm offset-sm-4">
- <?php
- if(GOOGLE_RECAPTCHA_SITE_KEY) {
- ?>
- <div class="g-recaptcha mb-1" data-sitekey="<?=GOOGLE_RECAPTCHA_SITE_KEY?>"></div>
- <?php
- }
- ?>
- <button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(__("Register"))?></button>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
|