PluginProbe
Tutor LMS – eLearning and online course solution / 2.6.0
Tutor LMS – eLearning and online course solution v2.6.0
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
tutor / templates / dashboard / instructor / registration.php
registration.php
175 lines 5.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Registration template
4 *
5 * @package Tutor\Templates
6 * @subpackage Dashboard\Instructor
7 * @author Themeum <support@themeum.com>
8 * @link https://themeum.com
9 * @since 1.4.3
10 */
11
12 ?>
13
14 <?php if ( ! get_option( 'users_can_register', false ) ) : ?>
15
16 <?php
17 $args = array(
18 'image_path' => tutor()->url . 'assets/images/construction.png',
19 'title' => __( 'Oooh! Access Denied', 'tutor' ),
20 'description' => __( 'You do not have access to this area of the application. Please refer to your system administrator.', 'tutor' ),
21 'button' => array(
22 'text' => __( 'Go to Home', 'tutor' ),
23 'url' => get_home_url(),
24 'class' => 'tutor-btn',
25 ),
26 );
27 tutor_load_template( 'feature_disabled', $args );
28 ?>
29
30 <?php else : ?>
31
32 <div id="tutor-registration-wrap">
33
34 <?php do_action( 'tutor_before_instructor_reg_form' ); ?>
35
36 <form method="post" enctype="multipart/form-data" id="tutor-registration-form">
37
38 <?php do_action( 'tutor_instructor_reg_form_start' ); ?>
39
40 <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
41 <input type="hidden" value="tutor_register_instructor" name="tutor_action"/>
42
43 <?php
44 $errors = apply_filters( 'tutor_instructor_register_validation_errors', array() );//phpcs:ignore
45 if ( is_array( $errors ) && count( $errors ) ) {
46 echo '<div class="tutor-alert tutor-warning"><ul class="tutor-required-fields">';
47 foreach ( $errors as $error_key => $error_value ) {
48 echo wp_kses( "<li>{$error_value}</li>", array( 'li' => array() ) );
49 }
50 echo '</ul></div>';
51 }
52 ?>
53
54 <div class="tutor-form-row">
55 <div class="tutor-form-col-6">
56 <div class="tutor-form-group">
57 <label>
58 <?php esc_html_e( 'First Name', 'tutor' ); ?>
59 </label>
60
61 <input type="text" name="first_name" value="<?php echo esc_attr( tutor_utils()->input_old( 'first_name' ) ); ?>" placeholder="<?php esc_html_e( 'First Name', 'tutor' ); ?>" required autocomplete="given-name">
62 </div>
63 </div>
64
65 <div class="tutor-form-col-6">
66 <div class="tutor-form-group">
67 <label>
68 <?php esc_html_e( 'Last Name', 'tutor' ); ?>
69 </label>
70
71 <input type="text" name="last_name" value="<?php echo esc_attr( tutor_utils()->input_old( 'last_name' ) ); ?>" placeholder="<?php esc_html_e( 'Last Name', 'tutor' ); ?>" required autocomplete="family-name">
72 </div>
73 </div>
74
75
76 </div>
77
78 <div class="tutor-form-row">
79
80 <div class="tutor-form-col-6">
81 <div class="tutor-form-group">
82 <label>
83 <?php esc_html_e( 'User Name', 'tutor' ); ?>
84 </label>
85
86 <input type="text" name="user_login" class="tutor_user_name" value="<?php echo esc_attr( tutor_utils()->input_old( 'user_login' ) ); ?>" placeholder="<?php esc_html_e( 'User Name', 'tutor' ); ?>" required autocomplete="username">
87 </div>
88 </div>
89
90 <div class="tutor-form-col-6">
91 <div class="tutor-form-group">
92 <label>
93 <?php esc_html_e( 'E-Mail', 'tutor' ); ?>
94 </label>
95
96 <input type="text" name="email" value="<?php echo esc_attr( tutor_utils()->input_old( 'email' ) ); ?>" placeholder="<?php esc_html_e( 'E-Mail', 'tutor' ); ?>" required autocomplete="email">
97 </div>
98 </div>
99
100 </div>
101
102 <div class="tutor-form-row">
103 <div class="tutor-form-col-6">
104 <div class="tutor-form-group">
105 <div class="tutor-password-strength-checker">
106 <div class="tutor-password-field">
107 <label>
108 <?php esc_html_e( 'Password', 'tutor' ); ?>
109 </label>
110
111 <input class="password-checker" id="tutor-new-password" type="password" name="password" value="<?php echo esc_attr( tutor_utils()->input_old( 'password' ) ); ?>" placeholder="<?php esc_html_e( 'Password', 'tutor' ); ?>" required autocomplete="new-password">
112 <span class="show-hide-btn"></span>
113 </div>
114 <div class="tutor-password-strength-hint">
115 <div class="indicator">
116 <span class="weak"></span>
117 <span class="medium"></span>
118 <span class="strong"></span>
119 </div>
120 <div class="text tutor-fs-7 tutor-color-muted"></div>
121 </div>
122 </div>
123 </div>
124 </div>
125
126 <div class="tutor-form-col-6">
127 <div class="tutor-form-group">
128 <label>
129 <?php esc_html_e( 'Password confirmation', 'tutor' ); ?>
130 </label>
131
132 <div class="tutor-form-wrap">
133 <span class="tutor-validation-icon tutor-icon-mark tutor-color-success tutor-form-icon tutor-form-icon-reverse" style="display: none;"></span>
134 <input type="password" name="password_confirmation" value="<?php echo esc_attr( tutor_utils()->input_old( 'password_confirmation' ) ); ?>" placeholder="<?php esc_html_e( 'Password Confirmation', 'tutor' ); ?>" required autocomplete="new-password" style="margin-bottom: 0;">
135 </div>
136 </div>
137 </div>
138 </div>
139
140 <div class="tutor-form-row">
141 <div class="tutor-form-col-12">
142 <div class="tutor-form-group">
143 <?php
144 // Providing register_form hook.
145 do_action( 'tutor_instructor_reg_form_middle' );
146 do_action( 'register_form' );
147 ?>
148 </div>
149 </div>
150 </div>
151
152 <?php do_action( 'tutor_instructor_reg_form_end' ); ?>
153
154 <?php
155 $tutor_toc_page_link = tutor_utils()->get_toc_page_link();
156 ?>
157
158 <?php if ( null !== $tutor_toc_page_link ) : ?>
159 <div class="tutor-mb-24">
160 <?php esc_html_e( 'By signing up, I agree with the website\'s', 'tutor' ); ?> <a target="_blank" href="<?php echo esc_url( $tutor_toc_page_link ); ?>" title="<?php esc_attr_e( 'Terms and Conditions', 'tutor' ); ?>"><?php esc_html_e( 'Terms and Conditions', 'tutor' ); ?></a>
161 </div>
162 <?php endif; ?>
163
164 <div>
165 <button type="submit" name="tutor_register_instructor_btn" value="register" class="tutor-btn tutor-btn-primary tutor-btn-block"><?php esc_html_e( 'Register as instructor', 'tutor' ); ?></button>
166 </div>
167 <?php do_action( 'tutor_after_register_button' ); ?>
168
169 </form>
170 <?php do_action( 'tutor_after_registration_form_wrap' ); ?>
171 </div>
172
173 <?php do_action( 'tutor_after_instructor_reg_form' ); ?>
174 <?php endif; ?>
175