-
Notifications
You must be signed in to change notification settings - Fork 0
/
reg_request_page.php
66 lines (57 loc) · 2.64 KB
/
reg_request_page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php /* Template Name: reg_request */
if (is_user_logged_in()) wp_redirect(site_url());
$recaptchaSiteKey = "6LegGHYaAAAAAAvyBXcVrLC5GRlcWLxCVhKcI0Pq";
$isIE =
preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) ||
preg_match('~Trident/7.0(.*)?; rv:11.0~', $_SERVER['HTTP_USER_AGENT']);
if ($isIE) {
wp_enqueue_script('unfetch-polyfill', 'https://unpkg.com/[email protected]/polyfill/index.js');
}
wp_enqueue_script('pristine', get_stylesheet_directory_uri() . '/includes/pristine.min.js', [], false, true);
wp_enqueue_script('google-recaptcha', 'https://www.google.com/recaptcha/api.js?render=' . $recaptchaSiteKey, [], false, true);
wp_enqueue_script('af-custom', get_stylesheet_directory_uri() . '/includes/custom.js', [], false, true);
wp_localize_script('af-custom', 'wpRestApi', [
'root' => esc_url_raw(rest_url() . 'aa_restserver/v1'),
'siteUrl' => site_url(),
'recaptchaSiteKey' => $recaptchaSiteKey
]);
get_header(); ?>
<form name="registration" method="POST" style="width:600px; margin:2rem auto;">
<div class="form-group">
<label for="first_name">Jméno</label>
<input type="text" name="first_name" id="first_name" required data-pristine-required-message="Toto pole je povinné"
class="form-control">
</div>
<div class="form-group">
<label for="last_name">Příjmení</label>
<input type="text" name="last_name" id="last_name" required data-pristine-required-message="Toto pole je povinné"
class="form-control">
</div>
<div class="form-group">
<label for="department">Oddělení (nepovinné)</label>
<input type="text" name="department" id="department"
class="form-control">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" required data-pristine-required-message="Toto pole je povinné" data-pristine-email-message="Zadejte validní email"
class="form-control">
</div>
<div class="form-group">
<label for="password">Heslo</label>
<input type="password" name="password" id="password"
required
data-pristine-required-message="Zvolte si heslo"
class="form-control"
>
</div>
<div class="form-group">
<label for="password_retyped">Heslo znovu</label>
<input type="password" name="password_retyped" id="password_retyped"
data-pristine-equals="#password"
data-pristine-equals-message="Hesla se neshodují"
class="form-control">
</div>
<button type="button" onclick='af_regForm_onSubmit(event)'>Odeslat žádost</button>
</form>
<?php get_footer(); ?>