<?php

defined('ABSPATH') || die('Access Denied');

$lists = $this->lists;
$list_date_formats = $lists['date_formats'];

$options = $this->options;
$initial_values = $options['initial_values'];

$list_order_shipping_type = array();
$list_order_shipping_type[] = (object)array('value' => 'per_order', 'text' => __('Per order', 'wde'));
$list_order_shipping_type[] = (object)array('value' => 'per_item', 'text' => __('Per item', 'wde'));
?>
<table class="adminlist table">
  <tbody>
    <tr>
      <td class="col_key">
        <label for="option_include_discount_in_price">
          <?php _e('Include discount in price', 'wde'); ?>:
        </label>
      </td>
      <td class="col_value">
        <?php echo WDFHTML::wd_radio('option_include_discount_in_price', $initial_values['option_include_discount_in_price'], __('Yes', 'wde'), __('No', 'wde')); ?>
        <a class="jfbutton jfbutton_color_blue jfbutton_size_medium"
           target="_blank"
           href="<?php echo esc_url(admin_url('edit-tags.php?taxonomy=wde_discounts')); ?>"
           title="<?php _e('To add a new discount or edit the existing one, please click on the button.', 'wde'); ?>"><?php _e('Manage discount', 'wde'); ?></a>
      </td>
    </tr>
    <tr>
      <td class="col_key">
        <label for="option_include_tax_in_price">
          <?php _e('Include tax in price', 'wde'); ?>:
        </label>
      </td>
      <td class="col_value">
        <?php echo WDFHTML::wd_radio('option_include_tax_in_price', $initial_values['option_include_tax_in_price'], __('Yes', 'wde'), __('No', 'wde')); ?>
        <a class="jfbutton jfbutton_color_blue jfbutton_size_medium"
           target="_blank"
           href="<?php echo esc_url(admin_url('edit-tags.php?taxonomy=wde_taxes')); ?>"
           title="<?php _e('To add a new tax or edit the existing one, please click on the button.', 'wde'); ?>"><?php _e('Manage tax', 'wde'); ?></a>
      </td>
    </tr>
    <tr>
      <td class="col_key">
        <label for="option_order_shipping_type">
          <?php _e('Shipping rate calculation', 'wde'); ?>:
        </label>
      </td>
      <td class="col_value">
        <?php echo WDFHTML::wd_radio_list('option_order_shipping_type', $list_order_shipping_type, 'value', 'text', $initial_values['option_order_shipping_type']) ?>
      </td>
    </tr>
  </tbody>
  <!-- ctrls -->
  <tbody>
    <tr>
      <td class="btns_container" colspan="2">
        <?php
        echo WDFHTML::jfbutton(__('Reset', 'wde'), '', '', 'onclick="onBtnResetClick(event, this, \'other\');"');
        echo WDFHTML::jfbutton(__('Load default values', 'wde'), '', '', 'onclick="onBtnLoadDefaultValuesClick(event, this, \'other\');"');
        ?>
      </td>
    </tr>
  </tbody>
</table>