Updated styling for 'Manage Credits' page
This commit is contained in:
parent
c7b7b26958
commit
05bc1a4f49
1 changed files with 11 additions and 11 deletions
|
|
@ -26,24 +26,24 @@ $current_balance = function_exists('\Quiztech\AssessmentPlatform\Includes\quizte
|
||||||
|
|
||||||
get_header(); ?>
|
get_header(); ?>
|
||||||
|
|
||||||
<div id="primary" class="content-area">
|
<div id="primary" class="content-area quiztech-content-area">
|
||||||
<main id="main" class="site-main">
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
<?php the_title( '<h1 class="entry-title quiztech-page-title">', '</h1>' ); ?>
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<h2><?php esc_html_e( 'Your Credit Balance', 'quiztech' ); ?></h2>
|
<h2 class="quiztech-section-title"><?php esc_html_e( 'Your Credit Balance', 'quiztech' ); ?></h2>
|
||||||
<p class="quiztech-credit-balance" style="font-size: 1.5em; font-weight: bold;">
|
<p class="quiztech-credit-balance" style="font-size: 1.5em; font-weight: bold;">
|
||||||
<?php echo esc_html( $current_balance ); ?> <?php esc_html_e( 'Credits', 'quiztech' ); ?>
|
<?php echo esc_html( $current_balance ); ?> <?php esc_html_e( 'Credits', 'quiztech' ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2><?php esc_html_e( 'Purchase Credits', 'quiztech' ); ?></h2>
|
<h2 class="quiztech-section-title"><?php esc_html_e( 'Purchase Credits', 'quiztech' ); ?></h2>
|
||||||
<p><?php esc_html_e( 'Select a package below to add credits to your account.', 'quiztech' ); ?></p>
|
<p><?php esc_html_e( 'Select a package below to add credits to your account.', 'quiztech' ); ?></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -55,9 +55,9 @@ get_header(); ?>
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="quiztech-credit-packages" style="display: flex; gap: 20px; flex-wrap: wrap;">
|
<div class="quiztech-credit-packages quiztech-grid-container" style="display: flex; gap: 20px; flex-wrap: wrap;">
|
||||||
<?php foreach ( $credit_packages as $package_id => $package ) : ?>
|
<?php foreach ( $credit_packages as $package_id => $package ) : ?>
|
||||||
<div class="quiztech-credit-package" style="border: 1px solid #eee; padding: 15px; text-align: center;">
|
<div class="quiztech-credit-package quiztech-widget-like" style="border: 1px solid #eee; padding: 15px; text-align: center;">
|
||||||
<h3><?php printf( esc_html__( '%d Credits', 'quiztech' ), intval( $package['amount'] ) ); ?></h3>
|
<h3><?php printf( esc_html__( '%d Credits', 'quiztech' ), intval( $package['amount'] ) ); ?></h3>
|
||||||
<p><?php printf( esc_html__( 'Price: %s %s', 'quiztech' ), esc_html( $package['price'] ), esc_html( $package['currency'] ) ); ?></p>
|
<p><?php printf( esc_html__( 'Price: %s %s', 'quiztech' ), esc_html( $package['price'] ), esc_html( $package['currency'] ) ); ?></p>
|
||||||
<form method="post" action="<?php echo esc_url( get_permalink() ); ?>">
|
<form method="post" action="<?php echo esc_url( get_permalink() ); ?>">
|
||||||
|
|
@ -67,7 +67,7 @@ get_header(); ?>
|
||||||
<input type="hidden" name="credit_amount" value="<?php echo esc_attr( $package['amount'] ); ?>">
|
<input type="hidden" name="credit_amount" value="<?php echo esc_attr( $package['amount'] ); ?>">
|
||||||
<input type="hidden" name="price" value="<?php echo esc_attr( $package['price'] ); ?>">
|
<input type="hidden" name="price" value="<?php echo esc_attr( $package['price'] ); ?>">
|
||||||
<input type="hidden" name="currency" value="<?php echo esc_attr( $package['currency'] ); ?>">
|
<input type="hidden" name="currency" value="<?php echo esc_attr( $package['currency'] ); ?>">
|
||||||
<button type="submit" class="button button-primary"><?php esc_html_e( 'Buy Now', 'quiztech' ); ?></button>
|
<button type="submit" class="quiztech-button quiztech-button-primary"><?php esc_html_e( 'Buy Now', 'quiztech' ); ?></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
@ -77,14 +77,14 @@ get_header(); ?>
|
||||||
// Display feedback messages if any (e.g., from the purchase initiation)
|
// Display feedback messages if any (e.g., from the purchase initiation)
|
||||||
if ( isset( $_GET['purchase_status'] ) ) {
|
if ( isset( $_GET['purchase_status'] ) ) {
|
||||||
if ( $_GET['purchase_status'] === 'initiated' ) {
|
if ( $_GET['purchase_status'] === 'initiated' ) {
|
||||||
echo '<div class="notice notice-info is-dismissible"><p>' . esc_html__( 'Redirecting to payment gateway...', 'quiztech' ) . '</p></div>';
|
echo '<div class="notice notice-info is-dismissible quiztech-notice"><p>' . esc_html__( 'Redirecting to payment gateway...', 'quiztech' ) . '</p></div>';
|
||||||
} elseif ( $_GET['purchase_status'] === 'error' ) {
|
} elseif ( $_GET['purchase_status'] === 'error' ) {
|
||||||
$error_message = isset( $_GET['message'] ) ? sanitize_text_field( urldecode( $_GET['message'] ) ) : __( 'An unknown error occurred.', 'quiztech' );
|
$error_message = isset( $_GET['message'] ) ? sanitize_text_field( urldecode( $_GET['message'] ) ) : __( 'An unknown error occurred.', 'quiztech' );
|
||||||
echo '<div class="notice notice-error is-dismissible"><p>' . esc_html( $error_message ) . '</p></div>';
|
echo '<div class="notice notice-error is-dismissible quiztech-notice"><p>' . esc_html( $error_message ) . '</p></div>';
|
||||||
} elseif ( $_GET['purchase_status'] === 'success' ) {
|
} elseif ( $_GET['purchase_status'] === 'success' ) {
|
||||||
echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'Credits successfully added!', 'quiztech' ) . '</p></div>';
|
echo '<div class="notice notice-success is-dismissible quiztech-notice"><p>' . esc_html__( 'Credits successfully added!', 'quiztech' ) . '</p></div>';
|
||||||
} elseif ( $_GET['purchase_status'] === 'cancelled' ) {
|
} elseif ( $_GET['purchase_status'] === 'cancelled' ) {
|
||||||
echo '<div class="notice notice-warning is-dismissible"><p>' . esc_html__( 'Payment cancelled.', 'quiztech' ) . '</p></div>';
|
echo '<div class="notice notice-warning is-dismissible quiztech-notice"><p>' . esc_html__( 'Payment cancelled.', 'quiztech' ) . '</p></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue