announcements
3 years ago
assignments
3 years ago
elements
3 years ago
enrolled-courses
4 years ago
instructor
3 years ago
my-courses
4 years ago
my-quiz-attempts
3 years ago
notifications
4 years ago
question-answer
4 years ago
quiz-attempts
4 years ago
reviews
4 years ago
settings
3 years ago
withdraw-method-fields
4 years ago
announcements.php
4 years ago
assignments.php
3 years ago
create-course.php
3 years ago
dashboard.php
3 years ago
enrolled-courses.php
4 years ago
index.php
4 years ago
logged-in.php
4 years ago
my-courses.php
3 years ago
my-profile.php
3 years ago
my-quiz-attempts.php
3 years ago
purchase_history.php
3 years ago
question-answer.php
4 years ago
quiz-attempts.php
3 years ago
registration.php
3 years ago
reviews.php
3 years ago
settings.php
4 years ago
wishlist.php
3 years ago
withdraw.php
3 years ago
registration.php
150 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Tutor registration template |
| 4 | * |
| 5 | * @since 1.4.3 |
| 6 | * @package TutorLMS/Templates |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | |
| 11 | <?php if ( ! get_option( 'users_can_register', false ) ) : ?> |
| 12 | <?php |
| 13 | $args = array( |
| 14 | 'image_path' => tutor()->url . 'assets/images/construction.png', |
| 15 | 'title' => __( 'Oooh! Access Denied', 'tutor' ), |
| 16 | 'description' => __( 'You do not have access to this area of the application. Please refer to your system administrator.', 'tutor' ), |
| 17 | 'button' => array( |
| 18 | 'text' => __( 'Go to Home', 'tutor' ), |
| 19 | 'url' => get_home_url(), |
| 20 | 'class' => 'tutor-btn', |
| 21 | ), |
| 22 | ); |
| 23 | tutor_load_template( 'feature_disabled', $args ); |
| 24 | ?> |
| 25 | <?php else : ?> |
| 26 | |
| 27 | <?php do_action( 'tutor_before_student_reg_form' ); ?> |
| 28 | |
| 29 | <form method="post" enctype="multipart/form-data" id="tutor-registration-from"> |
| 30 | <input type="hidden" name="tutor_course_enroll_attempt" value="<?php echo isset( $_GET['enrol_course_id'] ) ? (int) $_GET['enrol_course_id'] : ''; ?>"> |
| 31 | <?php do_action( 'tutor_student_reg_form_start' ); ?> |
| 32 | |
| 33 | <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?> |
| 34 | <input type="hidden" value="tutor_register_student" name="tutor_action"/> |
| 35 | |
| 36 | <?php |
| 37 | $validation_errors = apply_filters( 'tutor_student_register_validation_errors', array() ); |
| 38 | if ( is_array( $validation_errors ) && count( $validation_errors ) ) : |
| 39 | ?> |
| 40 | <div class="tutor-alert tutor-warning tutor-mb-12"> |
| 41 | <ul class="tutor-required-fields"> |
| 42 | <?php foreach ( $validation_errors as $validation_error ) : ?> |
| 43 | <li> |
| 44 | <?php echo esc_html( $validation_error ); ?> |
| 45 | </li> |
| 46 | <?php endforeach; ?> |
| 47 | </ul> |
| 48 | </div> |
| 49 | <?php endif; ?> |
| 50 | |
| 51 | <div class="tutor-form-row"> |
| 52 | <div class="tutor-form-col-6"> |
| 53 | <div class="tutor-form-group"> |
| 54 | <label> |
| 55 | <?php esc_html_e( 'First Name', 'tutor' ); ?> |
| 56 | </label> |
| 57 | |
| 58 | <input type="text" name="first_name" value="<?php echo esc_attr( tutor_utils()->input_old( 'first_name' ) ); ?>" placeholder="<?php _e( 'First Name', 'tutor' ); ?>" required autocomplete="given-name"> |
| 59 | </div> |
| 60 | </div> |
| 61 | |
| 62 | <div class="tutor-form-col-6"> |
| 63 | <div class="tutor-form-group"> |
| 64 | <label> |
| 65 | <?php esc_html_e( 'Last Name', 'tutor' ); ?> |
| 66 | </label> |
| 67 | |
| 68 | <input type="text" name="last_name" value="<?php echo esc_attr( tutor_utils()->input_old( 'last_name' ) ); ?>" placeholder="<?php _e( 'Last Name', 'tutor' ); ?>" required autocomplete="family-name"> |
| 69 | </div> |
| 70 | </div> |
| 71 | |
| 72 | </div> |
| 73 | |
| 74 | <div class="tutor-form-row"> |
| 75 | <div class="tutor-form-col-6"> |
| 76 | <div class="tutor-form-group"> |
| 77 | <label> |
| 78 | <?php esc_html_e( 'User Name', 'tutor' ); ?> |
| 79 | </label> |
| 80 | |
| 81 | <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"> |
| 82 | </div> |
| 83 | </div> |
| 84 | |
| 85 | <div class="tutor-form-col-6"> |
| 86 | <div class="tutor-form-group"> |
| 87 | <label> |
| 88 | <?php esc_html_e( 'E-Mail', 'tutor' ); ?> |
| 89 | </label> |
| 90 | |
| 91 | <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"> |
| 92 | </div> |
| 93 | </div> |
| 94 | |
| 95 | </div> |
| 96 | |
| 97 | <div class="tutor-form-row"> |
| 98 | <div class="tutor-form-col-6"> |
| 99 | <div class="tutor-form-group"> |
| 100 | <label> |
| 101 | <?php esc_html_e( 'Password', 'tutor' ); ?> |
| 102 | </label> |
| 103 | |
| 104 | <input 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"> |
| 105 | </div> |
| 106 | </div> |
| 107 | |
| 108 | <div class="tutor-form-col-6"> |
| 109 | <div class="tutor-form-group"> |
| 110 | <label> |
| 111 | <?php esc_html_e( 'Password confirmation', 'tutor' ); ?> |
| 112 | </label> |
| 113 | |
| 114 | <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"> |
| 115 | </div> |
| 116 | </div> |
| 117 | </div> |
| 118 | |
| 119 | |
| 120 | <div class="tutor-form-row"> |
| 121 | <div class="tutor-form-col-12"> |
| 122 | <div class="tutor-form-group"> |
| 123 | <?php |
| 124 | // providing register_form hook. |
| 125 | do_action( 'tutor_student_reg_form_middle' ); |
| 126 | do_action( 'register_form' ); |
| 127 | ?> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | |
| 132 | <?php do_action( 'tutor_student_reg_form_end' ); ?> |
| 133 | |
| 134 | <?php |
| 135 | $tutor_toc_page_link = tutor_utils()->get_toc_page_link(); |
| 136 | ?> |
| 137 | <?php if ( null !== $tutor_toc_page_link ) : ?> |
| 138 | <div class="tutor-mb-24"> |
| 139 | <?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_html_e( 'Terms and Conditions', 'tutor' ); ?>"><?php esc_html_e( 'Terms and Conditions', 'tutor' ); ?></a> |
| 140 | </div> |
| 141 | <?php endif; ?> |
| 142 | |
| 143 | <div> |
| 144 | <button type="submit" name="tutor_register_student_btn" value="register" class="tutor-btn tutor-btn-primary"><?php esc_html_e( 'Register', 'tutor' ); ?></button> |
| 145 | </div> |
| 146 | |
| 147 | </form> |
| 148 | <?php do_action( 'tutor_after_student_reg_form' ); ?> |
| 149 | <?php endif; ?> |
| 150 |