common
4 years ago
basic.php
4 years ago
buddypress.php
4 years ago
color_picker.php
4 years ago
design.php
4 years ago
google_classroom.php
4 years ago
gradebook.php
4 years ago
import_export.php
4 years ago
notifications.php
4 years ago
status.php
4 years ago
tab.php
4 years ago
tutor_pages.php
4 years ago
zoom.php
4 years ago
import_export.php
131 lines
| 1 | <div class="tutor-option-main-title"> |
| 2 | <div class="tutor-fs-4 tutor-fw-medium tutor-color-black"><?php _e('Import/Export','tutor'); ?></div> |
| 3 | </div> |
| 4 | |
| 5 | <?php |
| 6 | tutor_alert( |
| 7 | __( 'Warning: Importing, Restoring, or Resetting will overwrite ALL existing settings. Please proceed with caution.', 'tutor' ), |
| 8 | 'warning' |
| 9 | ); |
| 10 | ?> |
| 11 | |
| 12 | <div class="tutor-option-single-item tutor-mb-32"> |
| 13 | <div class="tutor-option-group-title tutor-mb-16"> |
| 14 | <div class="tutor-fs-6 tutor-color-muted"><?php _e('Export','tutor'); ?></div> |
| 15 | </div> |
| 16 | |
| 17 | <div class="item-wrapper"> |
| 18 | <div class="tutor-option-field-row"> |
| 19 | <div class="tutor-option-field-label"> |
| 20 | <div class="label tutor-fs-6 tutor-color-black"><?php _e('Current Settings','tutor'); ?></div> |
| 21 | <div class="desc tutor-fs-8 tutor-fw-medium tutor-color-secondary"> |
| 22 | <span style="font-weight: 500"><?php _e('Last Update','tutor'); ?>: </span> <?php echo get_option('tutor_option_update_time'); ?> |
| 23 | </div> |
| 24 | </div> |
| 25 | <div class="tutor-option-field-input"> |
| 26 | <button class="tutor-btn tutor-btn-outline-primary tutor-btn-sm" id="export_settings"><?php _e('Export Settings','tutor'); ?></button> |
| 27 | </div> |
| 28 | </div> |
| 29 | </div> |
| 30 | </div> |
| 31 | |
| 32 | <div class="tutor-option-single-item tutor-mb-32 item-variation-dragndrop import-setting"> |
| 33 | <div class="tutor-option-group-title tutor-mb-16"> |
| 34 | <div class="tutor-fs-6 tutor-color-muted"><?php _e('Import Settings','tutor'); ?></div> |
| 35 | </div> |
| 36 | <!-- @todo: fix the upload button --> |
| 37 | <div class="item-wrapper"> |
| 38 | <div class="tutor-option-field-row tutor-d-block"> |
| 39 | <div class="tutor-option-field-label"> |
| 40 | <div class="drag-drop-zone"> |
| 41 | <span class="tutor-icon-upload tutor-fs-1 tutor-color-primary"></span> |
| 42 | <div class="title"><?php _e('Drag & Drop your JSON File here','tutor'); ?> </div> |
| 43 | <div class="subtitle"><span><?php _e('File Format','tutor'); ?>:</span> .json <br> <?php _e('Or','tutor'); ?></div> |
| 44 | <label for="drag-drop-input" class="tutor-btn tutor-btn-primary tutor-btn-sm"> |
| 45 | <input type="file" name="drag-drop-input" id="drag-drop-input" class="tutor-d-none"> |
| 46 | <span><?php _e('Browse File','tutor'); ?></span> |
| 47 | </label> |
| 48 | <span class="file-info"></span> |
| 49 | </div> |
| 50 | </div> |
| 51 | <div class="tutor-option-field-input tutor-mt-16"> |
| 52 | <button class="tutor-btn tutor-btn-primary tutor-btn-md tutor_import_options" data-tutor-modal-target="tutor-modal-bulk-action" data-btntext="<?php _e('Yes, Import Settings','tutor'); ?>" data-heading="<?php _e('Import from Previous Settings?','tutor'); ?>" data-message="<?php _e('WARNING! This will overwrite all existing settings, please proceed with caution.','tutor'); ?>" id="import_options"><?php _e('Update Settings','tutor'); ?></button> |
| 53 | </div> |
| 54 | </div> |
| 55 | </div> |
| 56 | </div> |
| 57 | |
| 58 | <div class="tutor-option-single-item tutor-mb-32 item-variation-table settings-history"> |
| 59 | <div class="tutor-option-group-title tutor-mb-16"> |
| 60 | <div class="tutor-fs-6 tutor-color-muted"><?php _e('Settings History','tutor'); ?></div> |
| 61 | </div> |
| 62 | <div class="item-wrapper history_data"> |
| 63 | <div class="tutor-option-field-row"> |
| 64 | <div class="tutor-option-field-label"> |
| 65 | <?php _e('Date','tutor'); ?> |
| 66 | </div> |
| 67 | </div> |
| 68 | <?php if ( $tutor_options = get_option( 'tutor_settings_log', array() ) ) : ?> |
| 69 | <?php |
| 70 | foreach ( $tutor_options as $key => $option_data ) : |
| 71 | $datetypeClass = $option_data['datatype'] == 'saved' ? ' label-primary' : ' label-refund'; |
| 72 | ?> |
| 73 | <div class="tutor-option-field-row"> |
| 74 | <div class="tutor-option-field-label"> |
| 75 | <div class="tutor-fs-7 tutor-fw-medium"> |
| 76 | <?php echo esc_html( $option_data['history_date'] ); ?> |
| 77 | <span class="tutor-badge-label tutor-ml-16<?php echo $datetypeClass; ?>"> <?php echo esc_html( ucwords( $option_data['datatype'] ) ); ?></span> |
| 78 | </div> |
| 79 | </div> |
| 80 | <div class="tutor-option-field-input"> |
| 81 | <button class="tutor-btn tutor-btn-outline-primary tutor-btn-sm apply_settings" data-tutor-modal-target="tutor-modal-bulk-action" data-btntext="<?php _e('Yes, Restore Settings','tutor'); ?>" data-heading="<?php _e('Restore Previous Settings?','tutor'); ?>" data-message="<?php _e('WARNING! This will overwrite all existing settings, please proceed with caution.','tutor'); ?>" data-id="<?php echo $key; ?>"><?php _e('Apply','tutor'); ?></button> |
| 82 | <div class="tutor-dropdown-parent tutor-ml-16"> |
| 83 | <button type="button" class="tutor-iconic-btn" action-tutor-dropdown="toggle"> |
| 84 | <span class="tutor-icon-kebab-menu" area-hidden="true"></span> |
| 85 | </button> |
| 86 | <ul class="tutor-dropdown tutor-dropdown-dark tutor-text-left"> |
| 87 | <li> |
| 88 | <a href="javascript:;" class="tutor-dropdown-item export_single_settings" data-id="<?php echo $key; ?>"> |
| 89 | <span class="tutor-icon-archive tutor-mr-8" area-hidden="true"></span> |
| 90 | <span><?php _e('Download','tutor'); ?></span> |
| 91 | </a> |
| 92 | </li> |
| 93 | <li> |
| 94 | <a href="javascript:;" class="tutor-dropdown-item delete_single_settings" data-tutor-modal-target="tutor-modal-bulk-action" data-btntext="<?php _e('Yes, Delete Settings','tutor'); ?>" data-heading="<?php _e('Delete This Settings?','tutor'); ?>" data-message="<?php _e('WARNING! This will remove the settings history data from your system, please proceed with caution.','tutor'); ?>" data-id="<?php echo $key; ?>"> |
| 95 | <span class="icon tutor-icon-trash-can-bold tutor-mr-8" area-hidden="true"></span> |
| 96 | <span><?php _e('Delete','tutor'); ?></span> |
| 97 | </a> |
| 98 | </li> |
| 99 | </ul> |
| 100 | </div> |
| 101 | </div> |
| 102 | </div> |
| 103 | <?php endforeach; ?> |
| 104 | <?php else : ?> |
| 105 | <div class="tutor-option-field-row"> |
| 106 | <div class="tutor-option-field-label"> |
| 107 | <div class="tutor-fs-7 tutor-fw-medium"><?php echo __( 'No settings data found.', 'tutor' ); ?></div> |
| 108 | </div> |
| 109 | </div> |
| 110 | <?php endif; ?> |
| 111 | </div> |
| 112 | </div> |
| 113 | |
| 114 | <div class="tutor-option-single-item tutor-mb-32"> |
| 115 | <div class="tutor-option-group-title tutor-mb-16"> |
| 116 | <div class="tutor-fs-6 tutor-color-muted"><?php _e('Reset Settings','tutor'); ?></div> |
| 117 | </div> |
| 118 | <div class="item-wrapper"> |
| 119 | <div class="tutor-option-field-row"> |
| 120 | <div class="tutor-option-field-label"> |
| 121 | <div class="tutor-fs-6 tutor-color-black"><?php _e( 'Reset Everything to Default', 'tutor' ); ?></div> |
| 122 | <div class="tutor-fs-7 tutor-fw-medium tutor-color-secondary"> |
| 123 | <span class="tutor-fw-medium"><?php _e( 'It will revert all settings to initial setup.', 'tutor' ); ?></span> |
| 124 | </div> |
| 125 | </div> |
| 126 | <div class="tutor-option-field-input"> |
| 127 | <button class="tutor-btn tutor-btn-outline-primary tutor-btn-sm tutor-reset-all" data-tutor-modal-target="tutor-modal-bulk-action" data-btntext="<?php _e('Yes, Reset Settings','tutor'); ?>" data-heading="<?php _e('Reset All Settings?','tutor'); ?>" data-message="<?php _e('WARNING! This will reset all settings to default, please proceed with caution.','tutor') ?>" id="reset_options"><?php _e('Reset All Settings','tutor'); ?></button> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | </div> |