Skip to content

Commit

Permalink
fix: bugs in product table fixed & form changes in settings and enrol…
Browse files Browse the repository at this point in the history
…lment (#43)

* refactor: client secret value hidden as a password

* fix: no css bug when order has more than one product

* refactor: added tooltip to checkbox fields in enrollment form
  • Loading branch information
julianramirez2 authored Oct 5, 2023
1 parent 98b4c3b commit ddaaba7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions admin/class-openedx-woocommerce-plugin-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ public function add_admin_order_item_values( $product, $item, $item_id = null )
'td' => array(),
)
);
} else {

$html_output = '<td>';
$html_output .= esc_html__( 'Product is not an Open edX Course', 'woocommerce' );
$html_output .= '</td>';

echo wp_kses(
$html_output,
array(
'td' => array(),
)
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,14 @@ public function render_enrollment_info_form( $post ) {
<td class="checkbox-td">
<input class="action-checkbox" type="checkbox" id="force" name="enrollment_force" value="opcion1">
<label for="force"><?php esc_html_e( 'Use the "force" flag', 'wp-openedx-woocommerce-plugin' ); ?></label>
<span class="tooltip-icon">?</span>
<span class="tooltip-text"><?php esc_html_e( 'Lorem ipsum.', 'wp-openedx-woocommerce-plugin' ); ?></span>
</td>
<td>
<input class="action-checkbox" type="checkbox" id="no_pre" name="enrollment_allowed" value="opcion1">
<label for="no_pre"><?php esc_html_e( "Create course enrollment allowed if the user doesn't exist", 'wp-openedx-woocommerce-plugin' ); ?></label>
<span class="tooltip-icon">?</span>
<span class="tooltip-text"><?php esc_html_e( 'Lorem ipsum.', 'wp-openedx-woocommerce-plugin' ); ?></span>
</td>
</tr>

Expand Down
2 changes: 1 addition & 1 deletion admin/views/class-openedx-woocommerce-plugin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function openedx_client_secret_callback() {
$value = get_option( 'openedx-client-secret' );
?>

<input class="setting_input" type="text" name="openedx-client-secret" id="openedx-client-secret"
<input class="setting_input" type="password" name="openedx-client-secret" id="openedx-client-secret"
value="<?php echo esc_attr( $value ); ?>" required />

<p class="description">
Expand Down

0 comments on commit ddaaba7

Please sign in to comment.