Skip to content

Commit

Permalink
⚡ Demo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeeptrivedi13 committed Jan 10, 2025
1 parent c1f2b1d commit 60fc301
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 24 deletions.
4 changes: 0 additions & 4 deletions edwiser-bridge/admin/assets/css/eb-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
text-decoration: underline;
}

.run-diagnostics-start {
margin-top: 40px;
}

.run-diagnostics-start li {
margin-bottom: 15px;
}
Expand Down
2 changes: 1 addition & 1 deletion edwiser-bridge/admin/assets/js/eb-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@
},
success: function (response) {
if ( isValidJsonString( response ) ) {
jQuery('.eb_json_valid_fix + .autofix_custom_message').text(eb_admin_js_object.turn_off_debug_log);
jQuery('.eb_json_valid_fix + .autofix_custom_message').html(eb_admin_js_object.turn_off_debug_log);
jQuery('.eb_json_valid_fix + .autofix_custom_message').slideDown();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions edwiser-bridge/admin/assets/js/eb-setup-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
*/
$(document).on('click', '.eb_setup_test_connection_btn', function (event) {
$("#eb-lading-parent").show();

$('.eb_setup_diagnostics_btn').show();
//get selected options
var url = $('#eb_setup_test_conn_mdl_url').val();
var token = $('#eb_setup_test_conn_token').val();
Expand Down Expand Up @@ -761,7 +761,7 @@
},
success: function (response) {
if ( isValidJsonString( response ) ) {
jQuery('.eb_json_valid_fix + .autofix_custom_message').text(eb_setup_wizard.turn_off_debug_log);
jQuery('.eb_json_valid_fix + .autofix_custom_message').html(eb_setup_wizard.turn_off_debug_log);
jQuery('.eb_json_valid_fix + .autofix_custom_message').slideDown();
return;
}
Expand Down
8 changes: 3 additions & 5 deletions edwiser-bridge/admin/class-eb-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,9 @@ class="<?php echo esc_attr( $value['class'] ); ?>"
if ( $show ) {
?>
<tr valign="top" class="<?php echo esc_attr( $value['parent_row_class'] ); ?>" style="position: relative;">
<?php if ( 'eb_diagnose_issues_button' != $value['id'] ) { ?>
<th scope="row" class="titledesc">
</th>
<?php } ?>
<td class="forminp forminp-<?php echo esc_html( sanitize_title( $value['type'] ) ); ?>" style="position: relative;">
<th scope="row" class="titledesc">
</th>
<td class="forminp forminp-<?php echo esc_html( sanitize_title( $value['type'] ) ); ?>" style="position: relative; <?php echo 'eb_diagnose_issues_button' != $value['id'] ? '' : 'padding-top: 0;'; ?>">
<input
name="<?php echo esc_attr( $value['id'] ); ?>"
id="<?php echo esc_attr( $value['id'] ); ?>"
Expand Down
4 changes: 2 additions & 2 deletions edwiser-bridge/admin/class-eb-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ public function admin_enqueue_scripts() {
'server_blocking_check' => esc_html__( 'Is the moodle site webservice accessible?', 'edwiser-bridge' ),
'contact_support' => esc_html__( 'Invalid response from server. Please contact plugin support', 'edwiser-bridge' ),
'contact_hosting' => esc_html__( 'The plugin is receiving an invalid response code from Moodle website or is unable to connect. Please contact your hosting provider.', 'edwiser-bridge' ),
'turn_off_debug_log' => esc_html__( 'Please turn off debug display(WP_DEBUG & WP_DEBUG_DISPLAY) in wp-config.php and disable debug mode on Moodle website as well to fix this issue.', 'edwiser-bridge' ),
'turn_off_debug_log' => sprintf( esc_html__( 'Please turn off debug display(WP_DEBUG & WP_DEBUG_DISPLAY) in wp-config.php and disable debug mode on Moodle website as well to fix this issue. Click %s here %s to learn more.', 'edwiser-bridge' ), '<a href="https://edwiser.helpscoutdocs.com/article/575-disabling-debugging-in-wordpress-and-moodle" target="_blank">', '</a>' ),
'token_mismatch' => esc_html__( 'Token added does not match the token configured on the moodle site.', 'edwiser-bridge' ),
'not_authorized' => esc_html__( 'The user(s) used to create token on Moodle is(are) not site administrator(s) or manager(s) and therefore has limited access. This might lead to some issues with data synchronization.', 'edwiser-bridge' ),
'not_authorized' => esc_html__( 'The user(s) associated with the token creation in Moodle are either not included in the web service\'s authorized users list or lack the required site administrator or manager roles. Consequently, their access is limited, which may result in issues with data synchronization.', 'edwiser-bridge' ),
'please_refresh' => esc_html__( 'Please refresh the page and check again. If the issue is still not resolved please contact support.', 'edwiser-bridge' ),
'wp_version_issue' => esc_html__( 'Your WordPress version is not supported. Please upgrade to the latest version.', 'edwiser-bridge' ),
'rest_disable_issue' => esc_html__( 'The REST API is disabled by either a Security plugin or some other plugin using hooks. It might also have been disabled in your server configuration. Please disable any security plugins and search for conflicts. If the issue doesnt get resolved contact the hosting provider to confirm that server configuration is not causing any issues.', 'edwiser-bridge' ),
Expand Down
14 changes: 9 additions & 5 deletions edwiser-bridge/admin/settings/class-eb-settings-connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,19 @@ public function get_settings( $current_section = '' ) {
'class' => 'button secondary',
'parent_row_class' => 'inline'
),
array(
'html' => '<th></th><td> <div class="eb_test_connection_response"></div> </td>',
'type' => 'cust_html',
),
array(
'html' => '<th></th><td><hr style="margin-bottom: 30px;" /><div style="font-size: 16px;">' . esc_html__( 'Are you are still facing issues related to connection?', 'edwiser-bridge' ) . '</div></td>',
'type' => 'cust_html',
),
array(
'title' => '',
'desc' => '',
'id' => 'eb_diagnose_issues_button',
'default' => __( 'Run Diagnostics', 'edwiser-bridge' ),
'default' => __( 'Troubleshoot', 'edwiser-bridge' ),
'type' => 'button',
'desc_tip' => false,
'class' => 'button secondary',
Expand All @@ -248,10 +256,6 @@ public function get_settings( $current_section = '' ) {
'show_condition' => 'no_token',
'parent_row_class' => 'inline'
),
array(
'html' => '<th></th><td> <div class="eb_test_connection_response"></div> </td>',
'type' => 'cust_html',
),
array(
'html' => '<th></th><td> <ul class="run-diagnostics-start"></ul> </td>',
'type' => 'cust_html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,8 @@ public function enqueue_scripts() {
'contact_support' => esc_html__( 'Invalid response from server. Please contact plugin support', 'edwiser-bridge' ),
'contact_hosting' => esc_html__( 'The plugin is receiving an invalid response code from Moodle website or is unable to connect. Please contact your hosting provider.', 'edwiser-bridge' ),
'token_mismatch' => esc_html__( 'Token added does not match the token configured on the moodle site.', 'edwiser-bridge' ),
'not_authorized' => esc_html__( 'The user(s) used to create token on Moodle is(are) not site administrator(s) or manager(s) and therefore has limited access. This might lead to some issues with data synchronization.', 'edwiser-bridge' ),
'turn_off_debug_log' => esc_html__( 'Please turn off debug display(WP_DEBUG & WP_DEBUG_DISPLAY) in wp-config.php and disable debug mode on Moodle website as well to fix this issue.', 'edwiser-bridge' ),
'not_authorized' => esc_html__( 'The user(s) associated with the token creation in Moodle are either not included in the web service\'s authorized users list or lack the required site administrator or manager roles. Consequently, their access is limited, which may result in issues with data synchronization.', 'edwiser-bridge' ),
'turn_off_debug_log' => sprintf( esc_html__( 'Please turn off debug display(WP_DEBUG & WP_DEBUG_DISPLAY) in wp-config.php and disable debug mode on Moodle website as well to fix this issue. Click %s here %s to learn more.', 'edwiser-bridge' ), '<a href="https://edwiser.helpscoutdocs.com/article/575-disabling-debugging-in-wordpress-and-moodle" target="_blank">', '</a>' ),
'please_refresh' => esc_html__( 'Please refresh the page and check again. If the issue is still not resolved please contact support.', 'edwiser-bridge' ),
'wp_version_issue' => esc_html__( 'Your WordPress version is not supported. Please upgrade to the latest version.', 'edwiser-bridge' ),
'rest_disable_issue' => esc_html__( 'The REST API is disabled by either a Security plugin or some other plugin using hooks. It might also have been disabled in your server configuration. Please disable any security plugins and search for conflicts. If the issue doesnt get resolved contact the hosting provider to confirm that server configuration is not causing any issues.', 'edwiser-bridge' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,12 @@ public function eb_setup_test_connection( $ajax = '1' ) {

<div class='eb_setup_settings_success_msg eb_setup_test_conn_success'> <span class="dashicons dashicons-yes-alt"></span> <?php esc_html_e( 'WordPress to Moodle connection successful!', 'edwiser-bridge' ); ?> </div>
<div class='eb_setup_settings_error_msg eb_setup_test_conn_error'> <span class="dashicons dashicons-yes-alt"></span> <?php esc_html_e( 'WordPress to Moodle connection successful!', 'edwiser-bridge' ); ?> </div>
<div><button class='eb_setup_sec_btn eb_setup_diagnostics_btn' style="float: right; padding: 5px 11px; margin-right: 0; display: none;"> <?php esc_html_e( 'Troubleshoot', 'edwiser-bridge' ); ?> </button></div>
</div>

</div>

<div class='eb_setup_btn_wrap'>
<div class='eb_setup_btn_wrap' style="clear: both;">
<input type='hidden' class='eb_setup_test_conne_url' >
<input type='hidden' class='eb_setup_test_conne_token' >
<input type='hidden' class='eb_setup_test_conne_lang' >
Expand All @@ -575,7 +576,6 @@ public function eb_setup_test_connection( $ajax = '1' ) {
<!-- <button class='eb_setup_sec_btn' data-step='<?php echo wp_kses( $step, $allowed_tags ); ?>' data-next-step='<?php echo wp_kses( $next_step, $allowed_tags ); ?>' data-is-next-sub-step='<?php echo wp_kses( $is_next_sub_step, $allowed_tags ); ?>'> <?php esc_html_e( 'Back', 'edwiser-bridge' ); ?> </button> -->
<button class='eb_setup_btn eb_setup_test_connection_btn <?php echo esc_attr( $disbaled ); ?>' data-step='<?php echo wp_kses( $step, $allowed_tags ); ?>' data-next-step='<?php echo wp_kses( $next_step, $allowed_tags ); ?>' data-is-next-sub-step='<?php echo wp_kses( $is_next_sub_step, $allowed_tags ); ?>' <?php echo esc_attr( $disbaled ); ?>> <?php esc_html_e( 'Test connection', 'edwiser-bridge' ); ?> </button>
<button class='eb_setup_btn eb_setup_save_and_continue eb_setup_test_connection_cont_btn' data-step='<?php echo wp_kses( $step, $allowed_tags ); ?>' data-next-step='<?php echo wp_kses( $next_step, $allowed_tags ); ?>' data-is-next-sub-step='<?php echo wp_kses( $is_next_sub_step, $allowed_tags ); ?>'> <?php esc_html_e( 'Continue the setup', 'edwiser-bridge' ); ?> </button>
<button class='eb_setup_btn eb_setup_diagnostics_btn'> <?php esc_html_e( 'Run diagnostics', 'edwiser-bridge' ); ?> </button>
</div>
<div class='eb_diagnostics_wrap'>
<ul class="run-diagnostics-start"></ul>
Expand Down
2 changes: 1 addition & 1 deletion edwiser-bridge/includes/api/class-eb-connection-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public function create_response_message( $url, $message ) {
<div>' . $message . '</div>
</div>
<div>
<div>' . sprintf( esc_html__( "Click %s Run Diagnostics %s button to get more details.", "edwiser-bridge" ), '<strong>', '</strong>' ) . '</div>
<div>' . sprintf( esc_html__( "Click %s Troubleshoot %s button to get more details.", "edwiser-bridge" ), '<strong>', '</strong>' ) . '</div>
</div>
</div>
Expand Down

0 comments on commit 60fc301

Please sign in to comment.