/** * * @param type $this_invoice */ function recurring_settings($this_invoice) { ?> <h4><?php _e('PayPal Subscriptions', WPI); ?> </h4> <table class="wpi_recurring_bill_settings"> <tr> <th><?php _e('Bill Every', WPI); ?> </th> <td> <?php echo WPI_UI::input("name=wpi_invoice[recurring][" . $this->type . "][length]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['length'] : '') . "&class=wpi_small wpi_bill_every_length"); ?> <?php echo WPI_UI::select("name=wpi_invoice[recurring][" . $this->type . "][unit]&values=" . serialize(array("days" => __("Day(s)", WPI), "weeks" => __("Week(s)", WPI), "months" => __("Month(s)", WPI), "years" => __("Year(s)", WPI))) . "¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['unit'] : '')); ?> </td> </tr> <tr> <th><?php _e('Billing Cycles', WPI); ?> </th> <td><?php echo WPI_UI::input("id=wpi_meta_recuring_cycles&name=wpi_invoice[recurring][" . $this->type . "][cycles]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['cycles'] : '') . "&class=wpi_small"); ?> </td> </tr> </table> <?php }
/** * Recurring settings UI * @param type $this_invoice */ function recurring_settings($this_invoice) { ?> <h4><?php _e('2Checkout Recurring Billing', WPI); ?> </h4> <table class="wpi_recurring_bill_settings"> <tr> <th style="cursor:help;" title="<?php _e('Specifies billing frequency.', WPI); ?> "><?php _e('Interval', WPI); ?> </th> <td> <?php echo WPI_UI::input("id=2co_recurrence_interval&name=wpi_invoice[recurring][" . $this->type . "][recurrence_interval]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['recurrence_interval'] : '') . "&special=size='2' maxlength='4' autocomplete='off'"); ?> <?php echo WPI_UI::select("name=wpi_invoice[recurring][" . $this->type . "][recurrence_period]&values=" . serialize(apply_filters('wpi_2co_recurrence_period', array("Week" => __("Week", WPI), "Month" => __("Month", WPI), "Year" => __("Year", WPI)))) . "¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['recurrence_period'] : '')); ?> </td> </tr> <tr> <th style="cursor:help;" title="<?php _e('Specifies billing duration.', WPI); ?> "><?php _e('Duration', WPI); ?> </th> <td> <?php echo WPI_UI::input("id=2co_duration_interval&name=wpi_invoice[recurring][" . $this->type . "][duration_interval]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['duration_interval'] : '') . "&special=size='2' maxlength='4' autocomplete='off'"); ?> <?php echo WPI_UI::select("name=wpi_invoice[recurring][" . $this->type . "][duration_period]&values=" . serialize(apply_filters('wpi_2co_duration_period', array("Week" => __("Week", WPI), "Month" => __("Month", WPI), "Year" => __("Year", WPI)))) . "¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['duration_period'] : '')); ?> </td> </tr> </table> <?php }
/** * Settings for recurring billing * @param type $this_invoice */ function recurring_settings($this_invoice) { ?> <h4><?php _e('Stripe Subscriptions', WPI); ?> </h4> <table class="wpi_recurring_bill_settings"> <tr> <th style="cursor:help;" title="<?php _e('Specifies billing frequency.', WPI); ?> "><?php _e('Interval', WPI); ?> </th> <td> <?php echo WPI_UI::select("name=wpi_invoice[recurring][" . $this->type . "][interval]&values=" . serialize(apply_filters('wpi_stripe_interval', array("week" => __("Week", WPI), "month" => __("Month", WPI), "year" => __("Year", WPI)))) . "¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['interval'] : '')); ?> </td> </tr> <tr> <th style="cursor:help;" title="<?php _e('The number of the unit specified in the interval parameter. For example, you could specify an interval_count of 3 and an interval of "month" for quarterly billing (every 3 months).', WPI); ?> "><?php _e('Interval Count', WPI); ?> </th> <td> <?php echo WPI_UI::input("id=stripe_interval_count&name=wpi_invoice[recurring][" . $this->type . "][interval_count]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['interval_count'] : '') . "&special=size='2' maxlength='4' autocomplete='off'"); ?> </td> </tr> </table> <?php }
<br /> <?php echo WPI_UI::input("type=text&name=menu_position&group=wpi_settings[products][post_type]&value=" . (!empty($wpi_settings['products']['post_type']['menu_position']) ? $wpi_settings['products']['post_type']['menu_position'] : self::$defaults['post_type']['menu_position'])); ?> <div class="description"><?php _e('The position in the menu order Products should appear.', WPI); ?> </div> </li> <li> <?php _e('Rewrite Slug', WPI); ?> <br /> <?php echo WPI_UI::input("type=text&name=slug&group=wpi_settings[products][post_type][rewrite]&value=" . (!empty($wpi_settings['products']['post_type']['rewrite']['slug']) ? $wpi_settings['products']['post_type']['rewrite']['slug'] : self::$defaults['post_type']['rewrite']['slug'])); ?> <div class="description"><?php _e('Customize the permalink structure slug. Leave blank to disable rewrites for Products.', WPI); ?> </div> </li> <li> <?php _e('Product should support', WPI); ?> <br /> <ul> <li> <label for="wpi_post_type_support_title">
//$user_information = array_merge($wpi_settings['user_meta']['required'], $custom_user_information); ?> <h3><?php _e('Billing / Invoicing Info', WPI); ?> </h3> <a name="billing_info"></a> <table class="form-table" > <?php foreach ($user_information as $field_id => $field_name) { ?> <tr> <th><?php _e($field_name, WPI); ?> </th> <td> <?php echo WPI_UI::input(array('type' => 'text', 'class' => 'regular-text', 'name' => $field_id, 'value' => get_user_meta($user_id, $field_id, true))); ?> </td> </tr> <?php } ?> <tr> <th></th> <td></td> </tr> </table>
function email_templates($wpi_settings) { ?> <?php $notifications_array = apply_filters('wpi_email_templates', $wpi_settings['notification']); ?> <?php //WPI_Functions::qc($notifications_array); ?> <table class="ud_ui_dynamic_table widefat form-table" style="margin-bottom:8px;" auto_increment="true"> <thead> <tr> <th><?php _e('Name', WPI); ?></th> <th style="width:150px;"><?php _e('Subject', WPI); ?></th> <th style="width:400px;"><?php _e('Content', WPI); ?></th> </tr> </thead> <tbody> <?php foreach($notifications_array as $slug => $notification): ?> <tr class="wpi_dynamic_table_row" slug="<?php echo $slug; ?>" new_row="false"> <td> <div style="position:relative;"> <span class="row_delete"> </span> <?php echo WPI_UI::input("name=wpi_settings[notification][{$slug}][name]&value={$notification['name']}&type=text&style=width:150px;margin-left:35px;")?> </div> </td> <td> <?php echo WPI_UI::input("name=wpi_settings[notification][{$slug}][subject]&value={$notification['subject']}&type=text&style=width:240px;")?> </td> <td> <?php echo WPI_UI::textarea("class=wpi_notification_template_content&name=wpi_settings[notification][{$slug}][content]&value=".urlencode($notification['content']))?> </td> </tr> <?php endforeach; ?> </tbody> <tfoot> <tr> <th colspan="3"> <input type='button' class="button wpi_button wpi_add_row" value="<?php esc_attr(_e('Add Template', WPI)); ?>"/> </th> </tr> </tfoot> </table> <?php }
<?php global $wpi_settings, $wpdb; ?> <div class="wrap"> <h2> </h2> <div class="postbox" id="wp_new_invoice_div"> <div class="inside"> <form action="<?php echo $wpi_settings['links']['manage_invoice']; ?> " method='POST' id="wpi_new_invoice_form"> <?php echo WPI_UI::input("name=wpi[new_invoice][invoice_id]&value=" . rand(1000, 90000000) . "&type=hidden"); ?> <table class="form-table" id="get_user_info"> <tr class="invoice_main"> <th><label for="wp_invoice_userlookup"><?php _e('E-mail Address:', WPI); ?> </label></th> <td> <?php WPI_UI::draw_user_auto_complete_field(); ?> <input type="submit" class="button" id="wp_invoice_create_new_invoice" value="<?php esc_attr(_e('Create New', WPI)); ?> "> <?php
/** * * @param type $this_invoice */ function recurring_settings($this_invoice) { ?> <h4><?php _e('Authorize.net ARB', WPI); ?> </h4> <table class="wpi_recurring_bill_settings"> <tr> <th><?php _e('Bill Every', WPI); ?> </th> <td> <?php echo WPI_UI::input("name=wpi_invoice[recurring][" . $this->type . "][length]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['length'] : '') . "&class=wpi_small wpi_bill_every_length"); ?> <?php echo WPI_UI::select("name=wpi_invoice[recurring][" . $this->type . "][unit]&values=" . serialize(array("days" => __("Day(s)", WPI), "months" => __("Month(s)", WPI))) . "¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['unit'] : '')); ?> </td> </tr> <tr> <th><?php _e('Billing Cycles', WPI); ?> </th> <td><?php echo WPI_UI::input("id=wpi_meta_recuring_cycles&name=wpi_invoice[recurring][" . $this->type . "][cycles]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['cycles'] : '') . "&class=wpi_small"); ?> </td> </tr> <tr> <th><?php _e('Payment Date', WPI); ?> </th> <td> <script type="text/javascript"> var recurring_send_invoice_automatically_<?php echo $this->type; ?> = '<?php echo !empty($this_invoice['recurring'][$this->type]['send_invoice_automatically']) ? $this_invoice['recurring'][$this->type]['send_invoice_automatically'] : 'on'; ?> '; jQuery( document ).bind('wpi_enable_recurring', function(){ if ( recurring_send_invoice_automatically_<?php echo $this->type; ?> == 'on' ) { wpi_disable_recurring_start_date( '<?php echo $this->type; ?> ' ); } else { wpi_enable_recurring_start_date( '<?php echo $this->type; ?> ' ); } }); </script> <?php echo WPI_UI::checkbox("special=data-type='{$this->type}'&id=wpi_wpi_invoice_recurring_send_invoice_automatically_{$this->type}&class=wpi_wpi_invoice_recurring_send_invoice_automatically {$this->type}&name=wpi_invoice[recurring][" . $this->type . "][send_invoice_automatically]&value=true&label=" . __('Automatically.', WPI), !empty($this_invoice['recurring'][$this->type]['send_invoice_automatically']) ? $this_invoice['recurring'][$this->type]['send_invoice_automatically'] : 'on'); ?> </td> </tr> <tr class="wpi_recurring_start_date <?php echo $this->type; ?> " style="display:<?php echo !empty($this_invoice['recurring'][$this->type]) && $this_invoice['recurring'][$this->type]['send_invoice_automatically'] == 'on' ? 'none;' : ''; ?> "> <th><?php _e('Date', WPI); ?> </th> <td> <div> <?php echo WPI_UI::select("id=r_start_date_mm&name=wpi_invoice[recurring][" . $this->type . "][start_date][month]&values=months¤t_value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['start_date']['month'] : '')); ?> <?php echo WPI_UI::input("id=r_start_date_jj&name=wpi_invoice[recurring][" . $this->type . "][start_date][day]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['start_date']['day'] : '') . "&special=size='2' maxlength='2' autocomplete='off'"); ?> <?php echo WPI_UI::input("id=r_start_date_aa&name=wpi_invoice[recurring][" . $this->type . "][start_date][year]&value=" . (!empty($this_invoice['recurring'][$this->type]) ? $this_invoice['recurring'][$this->type]['start_date']['year'] : '') . "&special=size='2' maxlength='4' autocomplete='off'"); ?> <br /> <span onclick="wp_invoice_add_time('r_start_date', 7);" class="wp_invoice_click_me"><?php _e('In One Week', WPI); ?> </span> | <span onclick="wp_invoice_add_time('r_start_date', 30);" class="wp_invoice_click_me"><?php _e('In 30 Days', WPI); ?> </span> | <span onclick="wp_invoice_add_time('r_start_date', 'clear');" class="wp_invoice_click_me"><?php _e('Clear', WPI); ?> </span> </div> </td> </tr> </table> <?php }
global $wpi_settings; $user_information = apply_filters('wpi_user_information', $wpi_settings['user_meta']['custom']); //$user_information = array_merge($wpi_settings['user_meta']['required'], $custom_user_information); ?> <h3><?php _e('Billing / Invoicing Info', WPI) ?></h3> <a name="billing_info"></a> <table class="form-table" > <?php foreach ($user_information as $field_id => $field_name) { ?> <tr> <th><?php _e($field_name, WPI) ?></th> <td><?php echo WPI_UI::input("class=regular-text&name=$field_id&value=".get_user_meta($user_id, $field_id, true)); ?></td> </tr> <?php } ?> <tr> <th></th> <td> </td> </tr> </table>
<div class="flexible_width_holder_content" style="margin-right:250px;"> <span class="row_delete"> </span> <?php echo WPI_UI::input("class=item_name&name=wpi_invoice[meta][discount][$counter][name]&value={$discount_item['name']}")?> </div> </div> <span class="fixed_width_holder"> <span class="item_type"><?php echo WPI_UI::select("name=wpi_invoice[meta][discount][$counter][type]&values=$discount_types¤t_value={$discount_item['type']}&class=item_type"); ?></span> <span class="item_price"><?php echo WPI_UI::input("name=wpi_invoice[meta][discount][$counter][amount]&value={$discount_item['amount']}&class=item_amount")?></span> <?php /** <span class="row_total" id="total_item_<?php echo $counter; ?>" ></span> */ ?> </span> </li> <?php $counter++; } ?> <li class="wpi_invoice_totals clearfix"> <dl>
/** * Our main settings page */ function wpi_chargify_settings() { global $wpi_settings; if ($this->enabled) { /** Chargify is enabled */ $products = isset($wpi_settings['chargify']['products']) && $wpi_settings['chargify']['products'] ? json_decode($wpi_settings['chargify']['products']) : false; $components = isset($wpi_settings['chargify']['components']) && $wpi_settings['chargify']['components'] ? json_decode($wpi_settings['chargify']['components'], ARRAY_A) : false; if ($products) { usort($products, 'wpi_chargify::sort_by_product_family'); } ?> <div class="wpi_box chargify"> <div class="wpi_box_header"> <strong><?php _e('Subscription Based Payments via Chargify', WPI); ?> </strong> </div> <div class="wpi_box_content"> <h3 class="title"><?php _e('General Information', WPI); ?> </h3> <?php if ($this->shell) { ?> <table class="form-table"> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("WPI API Key ", WPI); ?> </th> <td> <?php if ($this->valid_api_key) { echo $wpi_settings['wpi_api_key']; } else { _e('Oops, it looks like you haven\'t set your WPI API key on the Premium Features tab. Chargify will <strong>not</strong> work in it\'s current state.', WPI); } ?> </td> </tr> </table> <?php } else { ?> <table class="form-table"> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("Domain", WPI); ?> </th> <td><?php echo WPI_UI::input("name=wpi_settings[chargify][domain]&value={$wpi_settings['chargify']['domain']}"); ?> </td> </tr> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("API Key", WPI); ?> </th> <td><?php echo WPI_UI::input("name=wpi_settings[chargify][api_key]&value={$wpi_settings['chargify']['api_key']}"); ?> </td> </tr> </table> <?php } if ($this->valid_api_key) { ?> <h3><?php _e('Chargify Product Information', WPI); ?> </h3> <?php if (!$products) { ?> <?php _e('No products currently found, please update your API settings and ', WPI); ?> <a id="wpi_ajax_check_chargify_products" href="#" class="button"><?php _e('Check for Chargify Products', WPI); ?> </a> <?php } else { ?> <table class="form-table"> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("Update Products", WPI); ?> </th> <td><a id="wpi_ajax_check_chargify_products" href="#" class="button"><?php _e('Go', WPI); ?> </a> </td> </tr> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("Products Last Updated At", WPI); ?> </th> <td><?php echo wpi_chargify::format_date($wpi_settings['chargify']['products_last_updated']); ?> </td> </tr> <tr class="wpi_something_advanced_wrapper"> <th><?php _e("Management Shortcode", WPI); ?> </th> <td><code>[wpi_chargify_frontend_manage]</code></td> </tr> <tr class="wpi_something_advanced_wrapper"> <th colspan="2"><?php _e("Products", WPI); ?> </th> </tr> <tr class="wpi_something_advanced_wrapper"> <td colspan="2"> <table class="wp-list-table widefat wpi_chargify_products"> <thead> <tr> <th class="name"><?php _e('Name', WPI); ?> </th> <th class="trial"><?php _e('Trial', WPI); ?> </th> <th class="price"><?php _e('Price', WPI); ?> </th> </tr> </thead> <tfoot> <tr> <th><?php _e('Name', WPI); ?> </th> <th><?php _e('Trial', WPI); ?> </th> <th><?php _e('Price', WPI); ?> </th> </tr> </tfoot> <tbody> <?php foreach ($products as $product) { $alternate = isset($alternate) && !$alternate ? 'alternate' : ''; ?> <tr class="product <?php echo $alternate; ?> "> <td> <?php echo $product->product_family->name; ?> - <?php echo $product->name; ?> <div class="shortcode"> <code>[wpi_chargify_product name="<?php echo $product->handle; ?> "]</code> </div> </td> <td><?php echo wpi_chargify::get_trial_line($product); ?> </td> <td><?php echo wpi_chargify::get_price_line($product); ?> </td> </tr> <?php } ?> </tbody> </table> </td> </tr> <?php if (isset($components) && is_array($components) && count($components)) { ?> <tr class="wpi_something_advanced_wrapper"> <th colspan="2"><?php _e("Components", WPI); ?> </th> </tr> <tr class="wpi_something_advanced_wrapper"> <td colspan="2"> <table class="wp-list-table widefat wpi_chargify_components"> <thead> <tr> <th class="name"><?php _e('Name', WPI); ?> </th> <th class="trial"><?php _e('Type', WPI); ?> </th> <th class="price"><?php _e('Price', WPI); ?> </th> </tr> </thead> <tfoot> <tr> <th><?php _e('Name', WPI); ?> </th> <th><?php _e('Type', WPI); ?> </th> <th><?php _e('Price', WPI); ?> </th> </tr> </tfoot> <tbody> <?php foreach ($products as $product) { if (isset($last_component) && $last_component == $product->product_family->id) { continue; } if (!is_array($components[$product->product_family->id]) || !count($components[$product->product_family->id])) { continue; } foreach ($components[$product->product_family->id] as $component) { $alternate = isset($alternate) && !$alternate ? 'alternate' : ''; ?> <tr class="component <?php echo $alternate; ?> "> <td><?php echo $product->product_family->name; ?> - <?php echo $component['name']; ?> </td> <td><?php echo wpi_chargify::get_component_type_line($component); ?> </td> <td><?php echo wpi_chargify::get_component_price_line($component); ?> </td> </tr> <?php $last_component = $product->product_family->id; } } ?> </tbody> </table> </td> </tr> <?php } ?> </table> <?php } } ?> </div> <!-- /wpi_box_content --> <div class="wpi_box_footer"> <?php //pr( json_decode( $wpi_settings[ 'chargify' ][ 'products' ], ARRAY_A ), 1 ); ?> <?php //pr( json_decode( $wpi_settings[ 'chargify' ][ 'components' ], ARRAY_A ), 1 ); ?> </div> </div> <script type="text/javascript"> jQuery( document ).ready( function () { /** Check for product updates */ jQuery( "#wpi_ajax_check_chargify_products" ).click( function ( e ) { e.preventDefault(); jQuery( '.plugin_status' ).remove(); jQuery.post( ajaxurl, { action: 'wpi_ajax_check_chargify_products', from_ajax: '1' }, function ( data ) { message = "<div class='plugin_status updated fade'><p>" + data + "</p></div>"; jQuery( message ).insertAfter( "h2" ); } ); } ); } ); </script> <?php } else { /** Chargify is disabled */ ?> <div class="wpi_box chargify"> <div class="wpi_box_header"> <b><?php _e('Subscription Based Payments via Chargify', WPI); ?> </b> </div> <div class="wpi_box_content"> <p><?php _e('Did you know that you can now accept subscription payments using <a href="http://chargify.com" target="_blank">Chargify</a> and our <a href="#">Single Page Checkout</a> Premium Feature?'); ?> </p> </div> <div class="wpi_box_footer clearfix"> <?php _e('<a href="#" target="_blank">Tell Me More</a>', WPI); ?> </div> </div> <?php } }
?> <?php echo WPI_UI::textarea(array('name' => "wpi_settings[billing][{$key}][settings][{$key2}][value]", 'value' => $setting_value['value'], 'special' => 'readonly="readonly"')); ?> <?php } elseif (isset($setting_value['type']) && $setting_value['type'] == 'static') { ?> <p><?php echo !empty($setting_value['data']) ? $setting_value['data'] : ''; ?> </p> <?php } else { ?> <?php echo WPI_UI::input(array('type' => 'text', 'name' => "wpi_settings[billing][{$key}][settings][{$key2}][value]", 'value' => !empty($setting_value['value']) ? $setting_value['value'] : "")); ?> <?php } ?> <?php if (!empty($setting_value['special']) && is_array($setting_value['special']) && (!isset($setting_value['type']) || $setting_value['type'] != 'select')) { ?> <?php $s_count = 0; ?> <br/> <?php foreach ($setting_value['special'] as $s_label => $s_value) { ?> <span class="wp_invoice_click_me <?php
<div class="wp_invoice_lookup"> <form action="<?php echo get_permalink($wpi_settings['web_invoice_page']); ?>" method="POST"> <div for="wp_invoice_lookup_input"><?php echo $message; ?></div> <?php echo WPI_UI::input("name=wp_invoice_lookup_input&autocomplete=off")?> <input type="submit" value="<?php echo $button; ?>" class="wp_invoice_lookup_submit" /> </form> </div>
function status_meta_box($this_invoice) { $hidden = ''; if (!empty($_REQUEST['wpi']['new_invoice'])) { $hidden = ' hidden '; } ?> <div id="postbox_status_and_history" class="postbox <?php echo $hidden; ?>"> <h3 class="hndle"><?php _e("Invoice Status and History", WPI) ?></h3> <div class="inside" style="margin:0;padding:0;"> <div id="submitbox" class="submitbox" style="overflow: auto; max-height: 150px;"> <table id="wpi_enter_payments" class="form-table hidden" > <tr> <th><?php _e("Event Type", WPI) ?></th> <td> <?php echo WPI_UI::select("name=event_type&values=" . serialize(array('add_payment' => __('Receive Payment', WPI), 'add_charge' => __('Add Charge', WPI), 'do_adjustment' => __('Administrative Adjustment', WPI)))); ?> <span class="wpi_recurring_options"><?php _e('Note: Recurring bills cannot have administrative adjustments or additional charges, only received payments.', WPI); ?></span> </td> </tr> <tr> <th><?php _e("Event Amount", WPI) ?></th> <td> <?php echo WPI_UI::input("type=text&name=wpi_event_amount&class=wpi_money&special=autocomplete='off'"); ?> <span id="event_tax_holder" class="hidden"> <b style="padding:5px;"><?php _e("Charge Tax", WPI) ?></b><?php echo WPI_UI::input("type=text&name=wpi_event_tax&class=wpi_money&special=autocomplete='off'"); ?>% </span> </td> </tr> <tr> <th><?php _e("Event Date & Time", WPI) ?></th> <td> <?php echo WPI_UI::input("type=text&name=wpi_event_date&class=wpi_date"); ?> <?php echo WPI_UI::input("type=text&name=wpi_event_time&class=wpi_time"); ?> </td> </tr> <tr> <th><?php _e("Event Note", WPI) ?></th> <td><?php echo WPI_UI::input("name=wpi_event_note"); ?> </td> </tr> <tr> <th> </th> <td> <?php wp_nonce_field('wpi_process_manual_event_nonce', 'wpi_process_manual_event_nonce'); ?> <input type="button" class="button" value="<?php esc_attr(_e('Process Charge / Payment', WPI)); ?>" id="wpi_process_manual_event" /> <input type="button" class="button" value="<?php esc_attr(_e('Cancel', WPI)); ?>" onclick="wpi_show_paycharge_box();" /> <span class="wpi_ajax_response"></span> </td> </tr> </table> <div style="padding: 5px;"> <table class="form-table" id="wpi_invoice_status_table"> <?php if (!empty($this_invoice['log']) && is_array($this_invoice['log'])) { if (!empty($this_invoice['ID'])) { WPI_Functions::get_status($this_invoice['ID']); } } ?> </table> </div> </div> <div class="footer_functions"> <span class="wpi_clickable" onclick="jQuery('.wpi_event_update').toggle();"><?php _e('Toggle History Detail', WPI); ?></span> </div> </div> </div> <?php do_action('wpi_add_comments_box'); ?> <?php } ?>
echo WPI_UI::input("class=item_name&name=wpi_invoice[meta][discount][{$counter}][name]&value={$discount_item['name']}"); ?> </div> </div> <span class="fixed_width_holder"> <span class="item_type"><?php echo WPI_UI::select("name=wpi_invoice[meta][discount][{$counter}][type]&values={$discount_types}¤t_value={$discount_item['type']}&class=item_type"); ?> </span> <span class="item_price"><?php echo WPI_UI::input("name=wpi_invoice[meta][discount][{$counter}][amount]&value={$discount_item['amount']}&class=item_amount"); ?> </span> <?php /** <span class="row_total" id="total_item_<?php echo $counter; ?>" ></span> */ ?> </span> </li> <?php $counter++; } ?>
<div class="flexible_width_holder_content" style="margin-right:250px;"> <span class="row_delete"> </span> <?php echo WPI_UI::input(array('class' => 'item_name', 'name' => 'wpi_invoice[meta][discount][' . $counter . '][name]', 'value' => $discount_item['name'])); ?> </div> </div> <span class="fixed_width_holder"> <span class="item_type"> <?php echo WPI_UI::select(array('name' => 'wpi_invoice[meta][discount][' . $counter . '][type]', 'values' => $discount_types, 'current_value' => $discount_item['type'], 'class' => 'item_type')); ?> </span> <span class="item_price"> <?php echo WPI_UI::input(array('name' => 'wpi_invoice[meta][discount][' . $counter . '][amount]', 'value' => $discount_item['amount'], 'class' => 'item_amount')); ?> </span> </span> </li> <?php $counter++; ?> <?php } ?> <li class="wpi_invoice_totals clearfix"> <dl> <dt class="hidden column-invoice-details-subtotal"><?php _e("Subtotal Excluding Tax:", WPI);
/** * Plugins tab * * @param type $wpi_settings */ static function plugins($wpi_settings) { $parseUrl = parse_url(trim(get_bloginfo('url'))); $this_domain = trim($parseUrl['host'] ? $parseUrl['host'] : array_shift(explode('/', $parseUrl['path'], 2))); ?> <script type="text/javascript"> jQuery(document).ready(function() { //** Check plugin updates */ jQuery("#wpi_ajax_check_plugin_updates").click(function() { jQuery('.plugin_status').remove(); jQuery.post(ajaxurl, { action: 'wpi_ajax_check_plugin_updates' }, function(data) { message = "<div class='plugin_status updated fade'><p>" + data + "</p></div>"; jQuery(message).insertAfter("h2"); }); }); }); </script> <table class="form-table wpi_premium_feature_intro"> <tbody> <tr> <th><?php _e('Check for Updates', WPI); ?> </th> <td> <?php _e('Check for any premium feature updates from the Usability Dynamics Update server:', WPI); ?> <input type="button" id="wpi_ajax_check_plugin_updates" value="<?php esc_attr(_e('Check Updates', WPI)); ?> "> </td> </tr> <tr> <th><?php _e('Your Domain', WPI); ?> </th> <td> <?php _e('When purchasing the premium features you will need to specify your domain to add the license correctly. This is your domain:', WPI); echo ' <b>' . $this_domain . '</b>'; ?> <div id="wpi_plugins_ajax_response" class="hidden"></div> </td> </tr> <!--<tr> <th><?php _e('WP-Invoice API Key', WPI); ?> for <?php echo $this_domain; ?> </th> <td> <?php echo WPI_UI::input("type=text&name=wpi_api_key&group=wpi_settings&value=" . (isset($wpi_settings['wpi_api_key']) ? $wpi_settings['wpi_api_key'] : '')); ?> <div class="description"> <?php _e('Some subscription based premium features require an API key that is specific to this domain and WP-Invoice. You can get this from your account on <a href="#" target="_blank">UsabilityDynamics.com</a>.', WPI); ?> </div> </td> </tr>--> </tbody> </table> <table id="wpi_premium_feature_table" cellpadding="0" cellspacing="0"> <tr> <?php if (!empty($wpi_settings['available_features'])) { foreach ($wpi_settings['available_features'] as $plugin_slug => $plugin_data) { ?> <input type="hidden" name="wpi_settings[available_features][<?php echo $plugin_slug; ?> ][title]" value="<?php echo esc_attr(stripslashes($plugin_data['title'])); ?> " /> <input type="hidden" name="wpi_settings[available_features][<?php echo $plugin_slug; ?> ][tagline]" value="<?php echo esc_attr(stripslashes($plugin_data['tagline'])); ?> " /> <input type="hidden" name="wpi_settings[available_features][<?php echo $plugin_slug; ?> ][image]" value="<?php echo esc_attr(stripslashes($plugin_data['image'])); ?> " /> <input type="hidden" name="wpi_settings[available_features][<?php echo $plugin_slug; ?> ][description]" value="<?php echo esc_attr(stripslashes($plugin_data['description'])); ?> " /> <?php $installed = WPI_Functions::check_premium($plugin_slug); ?> <?php $active = @$wpi_settings['installed_features'][$plugin_slug]['disabled'] != 'false' ? true : false; ?> <?php if ($installed) { ?> <?php /* Do this to preserve settings after page save. */ ?> <input type="hidden" name="wpi_settings[installed_features][<?php echo $plugin_slug; ?> ][disabled]" value="<?php echo esc_attr(stripslashes($wpi_settings['installed_features'][$plugin_slug]['disabled'])); ?> " /> <input type="hidden" name="wpi_settings[installed_features][<?php echo $plugin_slug; ?> ][name]" value="<?php echo esc_attr(stripslashes($wpi_settings['installed_features'][$plugin_slug]['name'])); ?> " /> <input type="hidden" name="wpi_settings[installed_features][<?php echo $plugin_slug; ?> ][version]" value="<?php echo esc_attr(stripslashes($wpi_settings['installed_features'][$plugin_slug]['version'])); ?> " /> <input type="hidden" name="wpi_settings[installed_features][<?php echo $plugin_slug; ?> ][description]" value="<?php echo esc_attr(stripslashes($wpi_settings['installed_features'][$plugin_slug]['description'])); ?> " /> <?php } ?> <tr class="wpi_premium_feature_block"> <td valign="top" class="wpi_premium_feature_image"> <?php if (!empty($plugin_data['image'])) { ?> <a target="_blank" href="https://usabilitydynamics.com/products/wp-invoice/"><img src="<?php echo $plugin_data['image']; ?> " /></a> <?php } ?> </td> <td valign="top"> <div class="wpi_box"> <div class="wpi_box_header"> <strong><?php echo $plugin_data['title']; ?> </strong> <p><?php echo $plugin_data['tagline']; ?> <a target="_blank" href="https://usabilitydynamics.com/products/wp-invoice/premium-features/"><?php _e('[purchase feature]', WPI); ?> </a></p> </div> <div class="wpi_box_content"> <p><?php echo stripslashes($plugin_data['description']); ?> </p> </div> <div class="wpi_box_footer clearfix"> <?php if ($installed) { ?> <div class="alignleft"> <?php if ($wpi_settings['installed_features'][$plugin_slug]['needs_higher_wpi_version'] == 'true') { printf(__('This feature is disabled because it requires WP-Invoice %1$s or higher.'), $wpi_settings['installed_features'][$plugin_slug]['minimum_wpi_version']); } else { echo WPI_UI::checkbox("value=true&name=wpi_settings[installed_features][{$plugin_slug}][disabled]&label=" . __('Disable premium feature.', WPI), $wpi_settings['installed_features'][$plugin_slug]['disabled']); ?> </div> <div class="alignright"><?php _e('Feature installed, using version', WPI); ?> <?php echo $wpi_settings['installed_features'][$plugin_slug]['version']; ?> .</div> <?php } } else { $pr_link = 'https://usabilitydynamics.com/products/wp-invoice/premium/'; echo sprintf(__('Please visit <a href="%s">UsabilityDynamics.com</a> to purchase this feature.', WPI), $pr_link); } ?> </div> </div> </td> </tr> <?php } } else { ?> <tr> <td class="wpi_features_not_found"><?php _e('There are no available premium features. Try clicking Check Updates button above.', WPI); ?> </td><td></td> </tr> <?php } ?> </table> <?php }
} else { $display=''; } ?> <tr style="<?php echo $display; ?>"> <th width="300"><span class="<?php echo (!empty($setting_value['description']) ? "wp_invoice_tooltip" : ""); ?>" title="<?php echo (!empty($setting_value['description']) ? $setting_value['description'] : ''); ?>"><?php echo $setting_value['label']; ?></span></th> <td> <?php if (isset($setting_value['type']) && $setting_value['type'] == 'select') : ?> <?php echo WPI_UI::select("name=wpi_settings[billing][{$key}][settings][{$key2}][value]&values=" . serialize($setting_value['data']) . "¤t_value=".(!empty($setting_value['value']) ? $setting_value['value'] : "")); ?> <?php elseif (isset($setting_value['type']) && $setting_value['type'] == 'textarea') : ?> <?php echo WPI_UI::textarea("name=wpi_settings[billing][{$key}][settings][{$key2}][value]&value={$setting_value['value']}"); ?> <?php elseif (isset($setting_value['type']) && $setting_value['type'] == 'readonly') : ?> <?php echo WPI_UI::textarea("name=wpi_settings[billing][{$key}][settings][{$key2}][value]&value={$setting_value['value']}&special=readonly='readonly'"); ?> <?php else : ?> <?php echo WPI_UI::input("name=wpi_settings[billing][{$key}][settings][{$key2}][value]&value=".(!empty($setting_value['value']) ? $setting_value['value'] : "")); ?> <?php endif; ?> <?php if (!empty($setting_value['special']) && is_array($setting_value['special']) && (!isset($setting_value['type']) || $setting_value['type'] != 'select')) : ?> <?php $s_count = 0; ?> <br/> <?php foreach($setting_value['special'] as $s_label => $s_value): ?> <span class="wp_invoice_click_me" onclick="jQuery('input[name=\'wpi_settings[billing][<?php echo $key; ?>][settings][<?php echo $key2; ?>][value]\']').val('<?php echo $s_value; ?>');"><?php echo $s_label; ?></span> <?php echo (++$s_count < count($setting_value['special']) ? ' | ' : '' ); ?> <?php endforeach; ?> <?php endif; ?> </td> </tr> <?php } ?> </table>
<div class="wp_invoice_lookup"> <form action="<?php echo get_permalink($wpi_settings['web_invoice_page']); ?> " method="POST"> <div for="wp_invoice_lookup_input"><?php echo $message; ?> </div> <?php echo WPI_UI::input(array('name' => 'wp_invoice_lookup_input', 'autocomplete' => 'off', 'special' => 'placeholder="' . __('Invoice ID', WPI) . '"')); ?> <input type="submit" value="<?php echo $button; ?> " class="wp_invoice_lookup_submit" /> </form> </div>