| @@ -1,57 +1,60 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying paypal settings of setup wizard. | |
| 4 | - * | |
| 5 | - * @author ThimPres | |
| 6 | - * @package LearnPress/Admin/Views | |
| 7 | - * @version 3.0.0 | |
| 8 | - */ | |
| 9 | - | |
| 10 | -defined( 'ABSPATH' ) or exit; | |
| 11 | - | |
| 12 | -$settings = LP_Settings::instance(); | |
| 13 | - | |
| 14 | -?> | |
| 15 | -<table> | |
| 16 | - <tr> | |
| 17 | - <th><?php _e( 'Paypal Email', 'learnpress' ); ?></th> | |
| 18 | - <td> | |
| 19 | - <input class="regular-text" type="email" name="settings[paypal][paypal_email]" id="settings-paypal-email" | |
| 20 | - value="<?php echo esc_attr( $settings->get( 'paypal.paypal_email', '' ) ); ?>"> | |
| 21 | - <p class="description"> | |
| 22 | - <?php _e( 'Your Paypal email is in live mode.', 'learnpress' ); ?> | |
| 23 | - </p> | |
| 24 | - <input type="hidden" name="settings[paypal][enable]" value="yes"/> | |
| 25 | - </td> | |
| 26 | - </tr> | |
| 27 | - | |
| 28 | - <tr> | |
| 29 | - <th><?php _e( 'Currency', 'learnpress' ); ?></th> | |
| 30 | - <td> | |
| 31 | - <select id="currency" name="settings[currency][currency]" class="lp-tom-select"> | |
| 32 | - <?php | |
| 33 | - $payment_currencies = learn_press_currencies(); | |
| 34 | - | |
| 35 | - if ( $payment_currencies ) { | |
| 36 | - foreach ( $payment_currencies as $code => $symbol ) { | |
| 37 | - ?> | |
| 38 | - <option value="<?php echo esc_attr( $code ); ?>" data-symbol="<?php echo learn_press_get_currency_symbol( $code ); ?>" <?php selected( $code == 'USD' ); ?>><?php echo esc_html( $symbol ); ?></option> | |
| 39 | - <?php | |
| 40 | - } | |
| 41 | - } | |
| 42 | - ?> | |
| 43 | - </select> | |
| 44 | - </td> | |
| 45 | - </tr> | |
| 46 | -</table> | |
| 47 | - | |
| 48 | -<input type="hidden" name="settings[currency][currency_pos]" value="left"/> | |
| 49 | -<input type="hidden" name="settings[currency][thousands_separator]" value=","/> | |
| 50 | -<input type="hidden" name="settings[currency][decimals_separator]" value="."/> | |
| 51 | -<input type="hidden" name="settings[currency][number_of_decimals]" value="2"/> | |
| 52 | - | |
| 53 | -<script> | |
| 54 | - jQuery(function ($) { | |
| 55 | - $('#settings-paypal-email').focus(); | |
| 56 | - }) | |
| 57 | -</script> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying paypal settings of setup wizard. | |
| 4 | + * | |
| 5 | + * @author ThimPres | |
| 6 | + * @package LearnPress/Admin/Views | |
| 7 | + * @version 3.0.0 | |
| 8 | + */ | |
| 9 | + | |
| 10 | +defined( 'ABSPATH' ) or exit; | |
| 11 | + | |
| 12 | +$settings = LP_Settings::instance(); | |
| 13 | +$currency = $settings->get( 'currency', 'USD' ); | |
| 14 | +?> | |
| 15 | +<table> | |
| 16 | + <tr> | |
| 17 | + <th><?php _e( 'Paypal Email', 'learnpress' ); ?></th> | |
| 18 | + <td> | |
| 19 | + <input class="regular-text" type="email" name="settings[paypal][paypal_email]" id="settings-paypal-email" | |
| 20 | + value="<?php echo esc_attr( $settings->get( 'paypal.paypal_email', '' ) ); ?>"> | |
| 21 | + <p class="description"> | |
| 22 | + <?php _e( 'Your Paypal email is in live mode.', 'learnpress' ); ?> | |
| 23 | + </p> | |
| 24 | + <input type="hidden" name="settings[paypal][enable]" value="yes"/> | |
| 25 | + </td> | |
| 26 | + </tr> | |
| 27 | + | |
| 28 | + <tr> | |
| 29 | + <th><?php _e( 'Currency', 'learnpress' ); ?></th> | |
| 30 | + <td> | |
| 31 | + <select id="currency" name="settings[currency][currency]" class="lp-tom-select"> | |
| 32 | + <?php | |
| 33 | + $payment_currencies = learn_press_currencies(); | |
| 34 | + | |
| 35 | + if ( $payment_currencies ) { | |
| 36 | + foreach ( $payment_currencies as $code => $symbol ) { | |
| 37 | + ?> | |
| 38 | + <option value="<?php echo esc_attr( $code ); ?>" | |
| 39 | + data-symbol="<?php echo learn_press_get_currency_symbol( $code ); ?>" | |
| 40 | + <?php selected( $code === $currency ); ?>><?php echo esc_html( $symbol ); ?> | |
| 41 | + </option> | |
| 42 | + <?php | |
| 43 | + } | |
| 44 | + } | |
| 45 | + ?> | |
| 46 | + </select> | |
| 47 | + </td> | |
| 48 | + </tr> | |
| 49 | +</table> | |
| 50 | + | |
| 51 | +<input type="hidden" name="settings[currency][currency_pos]" value="left"/> | |
| 52 | +<input type="hidden" name="settings[currency][thousands_separator]" value=","/> | |
| 53 | +<input type="hidden" name="settings[currency][decimals_separator]" value="."/> | |
| 54 | +<input type="hidden" name="settings[currency][number_of_decimals]" value="2"/> | |
| 55 | + | |
| 56 | +<script> | |
| 57 | + jQuery(function ($) { | |
| 58 | + $('#settings-paypal-email').focus(); | |
| 59 | + }) | |
| 60 | +</script> | |