add_quiz.php
5 years ago
edit-lesson.php
5 years ago
edit_quiz.php
5 years ago
question_answer_edit_form.php
5 years ago
question_answer_form.php
5 years ago
question_form.php
5 years ago
edit-lesson.php
79 lines
| 1 | <form class="tutor_lesson_modal_form"> |
| 2 | <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?> |
| 3 | <input type="hidden" name="action" value="tutor_modal_create_or_update_lesson"> |
| 4 | <input type="hidden" name="lesson_id" value="<?php echo $post->ID; ?>"> |
| 5 | <input type="hidden" name="current_topic_id" value="<?php echo $topic_id; ?>"> |
| 6 | |
| 7 | <?php |
| 8 | if (get_tutor_option('enable_lesson_classic_editor')){ |
| 9 | ?> |
| 10 | <div class="modal-classic-btn-wrap"> |
| 11 | <a class="tutor-classic-editor-btn btn-sm" target="_blank" href="<?php echo esc_url(get_admin_url("/")); ?>post.php?post=<?php echo $post->ID; ?>&action=edit" > |
| 12 | <i class="tutor-icon-classic-editor topic-edit-icon"></i> <?php echo __('Classic Editor', 'tutor'); ?> |
| 13 | </a> |
| 14 | </div> |
| 15 | <?php |
| 16 | } |
| 17 | ?> |
| 18 | |
| 19 | <div class="lesson-modal-form-wrap"> |
| 20 | |
| 21 | <?php do_action('tutor_lesson_edit_modal_form_before', $post); ?> |
| 22 | |
| 23 | <div class="tutor-option-field-row"> |
| 24 | <div class="tutor-option-field tutor-lesson-modal-title-wrap"> |
| 25 | <input type="text" name="lesson_title" value="<?php echo stripslashes($post->post_title); ?>" placeholder="<?php _e('Lesson title', 'tutor'); ?>"> |
| 26 | </div> |
| 27 | </div> |
| 28 | |
| 29 | <div class="tutor-option-field-row"> |
| 30 | <div class="tutor-option-field"> |
| 31 | <?php |
| 32 | wp_editor(stripslashes($post->post_content), 'tutor_lesson_modal_editor', array( 'editor_height' => 150)); |
| 33 | ?> |
| 34 | </div> |
| 35 | </div> |
| 36 | |
| 37 | |
| 38 | <div class="tutor-option-field-row"> |
| 39 | <div class="tutor-option-field-label"> |
| 40 | <label for=""><?php _e('Feature Image', 'tutor'); ?></label> |
| 41 | </div> |
| 42 | <div class="tutor-option-field"> |
| 43 | <div class="tutor-option-gorup-fields-wrap"> |
| 44 | <div class="tutor-thumbnail-wrap "> |
| 45 | <p class="thumbnail-img tutor-lesson-edit-feature-img"> |
| 46 | <?php |
| 47 | $thumbnail_upload_text = __('Upload Feature Image', 'tutor'); |
| 48 | $lesson_thumbnail_id = ''; |
| 49 | if (has_post_thumbnail($post->ID)){ |
| 50 | $lesson_thumbnail_id = get_post_meta($post->ID, '_thumbnail_id', true); |
| 51 | echo get_the_post_thumbnail($post->ID); |
| 52 | $thumbnail_upload_text = __('Update Feature Image', 'tutor'); |
| 53 | } |
| 54 | ?> |
| 55 | <a href="javascript:;" class="tutor-lesson-thumbnail-delete-btn" style="display: <?php echo $lesson_thumbnail_id ? 'block':'none'; ?>;"><i class="tutor-icon-line-cross"></i></a> |
| 56 | </p> |
| 57 | |
| 58 | <input type="hidden" class="_lesson_thumbnail_id" name="_lesson_thumbnail_id" value="<?php echo $lesson_thumbnail_id; ?>"> |
| 59 | <button type="button" class="lesson_thumbnail_upload_btn tutor-btn bordered-btn"><?php echo $thumbnail_upload_text; ?></button> |
| 60 | </div> |
| 61 | </div> |
| 62 | </div> |
| 63 | </div> |
| 64 | |
| 65 | <?php |
| 66 | include tutor()->path.'views/metabox/video-metabox.php'; |
| 67 | include tutor()->path.'views/metabox/lesson-attachments-metabox.php'; |
| 68 | ?> |
| 69 | |
| 70 | <?php do_action('tutor_lesson_edit_modal_form_after', $post); ?> |
| 71 | |
| 72 | </div> |
| 73 | |
| 74 | <div class="modal-footer"> |
| 75 | <button type="button" class="tutor-btn active update_lesson_modal_btn" data-toast_error="<?php _e('Error', 'tutor'); ?>" data-toast_error_message="<?php _e('Action Failed', 'tutor'); ?>" data-toast_success="<?php _e('Success', 'tutor'); ?>" data-toast_success_message="<?php _e('Lesson Updated', 'tutor'); ?>"> |
| 76 | <?php _e('Update Lesson', 'tutor'); ?> |
| 77 | </button> |
| 78 | </div> |
| 79 | </form> |