function recurring_billing_box() {
  ?>
  <div class="postbox column-recurring-billing" id="wp_invoice_client_info_div">
    <h3>
      <label for="link_name">
      <?php _e("Recurring Billing", WPI) ?>
      </label>
    </h3>
    <div id="wp_invoice_enable_recurring_billing" class="wp_invoice_click_me" <?php if ($invoice->recurring) { ?>style="display:none;"<?php } ?>>
  <?php _e("Create a recurring billing schedule for this invoice.", WPI) ?>
    </div>
    <div class="wp_invoice_enable_recurring_billing" <?php if (!$invoice->recurring) { ?>style="display:none;"<?php } ?>>
      <table class="form-table" id="add_new_invoice">
        <tr>
          <th><a class="wp_invoice_tooltip" title="<?php _e("A name to identify this subscription by in addition to the invoice id. (ex: 'standard hosting')", WPI) ?>">
  <?php _e("Subscription Name", WPI) ?>
            </a></th>
          <td><?php echo WPI_UI::input('wp_invoice_subscription_name', $wp_invoice_subscription_name); ?></td>
        </tr>
        <tr>
          <th><?php _e("Start Date", WPI) ?></th>
          <td><span style="<?php if ($recurring_auto_start) { ?>display:none;<?php } ?>" class="wp_invoice_timestamp">
                <?php _e("Start automatically as soon as the customer enters their billing information. ", WPI) ?>
              <span class="wp_invoice_click_me" onclick="jQuery('.wp_invoice_timestamp').toggle();">
                <?php _e("Specify Start Date", WPI) ?>
              </span></span>
            <div style="<?php if (!$recurring_auto_start) { ?>display:none;<?php } ?>" class="wp_invoice_timestamp"> <?php echo WPI_UI::draw_select('wp_invoice_subscription_start_month', array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr", "05" => "May", "06" => "Jun", "07" => "Jul", "08" => "Aug", "09" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec"), $wp_invoice_subscription_start_month); ?> <?php echo WPI_UI::input('wp_invoice_subscription_start_day', $wp_invoice_subscription_start_day, ' size="2" maxlength="2" autocomplete="off" '); ?>, <?php echo WPI_UI::input('wp_invoice_subscription_start_year', $wp_invoice_subscription_start_year, ' size="4" maxlength="4" autocomplete="off" '); ?> <span onclick="wp_invoice_subscription_start_time(7);" class="wp_invoice_click_me">
                <?php _e("In One Week", WPI) ?>
              </span> | <span onclick="wp_invoice_subscription_start_time(30);" class="wp_invoice_click_me">
  <?php _e("In 30 Days", WPI) ?>
              </span> | <span onclick="jQuery('.wp_invoice_timestamp').toggle();wp_invoice_subscription_start_time('clear');"  class="wp_invoice_click_me">
              <?php _e("Start automatically", WPI) ?>
              </span> </div></td>
        </tr>
        <tr>
          <th><a class="wp_invoice_tooltip"  title="<?php _e("This will be the number of times the client will be billed. (ex: 12)", WPI) ?>">
  <?php _e("Bill Every", WPI) ?>
            </a></th>
          <td><?php echo WPI_UI::input('wp_invoice_subscription_length', $wp_invoice_subscription_length, ' size="3" maxlength="3" autocomplete="off" '); ?> <?php echo WPI_UI::draw_select('wp_invoice_subscription_unit', array("months" => __("month(s)", WPI), "days" => __("days", WPI)), $wp_invoice_subscription_unit); ?></td>
        </tr>
        <tr>
          <th><a class="wp_invoice_tooltip"  title="<?php _e("Keep it under the maximum of 9999.", WPI) ?>">
  <?php _e("Total Billing Cycles", WPI) ?>
            </a></th>
          <td><?php echo WPI_UI::input('wp_invoice_subscription_total_occurances', $wp_invoice_subscription_total_occurances, ' size="4" maxlength="4" autocomplete="off" '); ?></td>
        </tr>
        <tr>
          <th></th>
          <td><?php _e("All <b>recurring billing</b> fields must be filled out to activate recurring billing. ", WPI) ?>
            <span onclick="wp_invoice_cancel_recurring()" class="wp_invoice_click_me">
  <?php _e("Cancel Recurring Billing", WPI) ?>
            </span></td>
        </tr>
      </table>
    </div>
  </div>
  <?php
}
示例#2
0
            <tr class="advanced_gateway_info">
                    <th width="300"><?php 
_e('Security: MD5 Hash', WPI);
?>
</th>
                    <td><?php 
echo WPI_UI::draw_inputfield('wp_invoice_gateway_MD5Hash', $wp_invoice_gateway_MD5Hash);
?>
</td>
            </tr>
            <tr class="advanced_gateway_info">
                    <th><?php 
_e('Delim Data:', WPI);
?>
</th>
                    <td><?php 
echo WPI_UI::draw_select('wp_invoice_gateway_delim_data', array("TRUE" => __("True", WPI), "FALSE" => __("False", WPI)), $wp_invoice_gateway_delim_data);
?>
</td>
            </tr>
            <tr class="">
                    <th width="300">&nbsp;</th>
                    <td><span class="wp_invoice_click_me" onClick="jQuery('.advanced_gateway_info').toggle();"><?php 
_e('Toggle Advanced Options', WPI);
?>
</span></td>
            </tr>
        </table>
    </div>
</div>