2014-11-20 14:46:19 +00:00
< ? php
if ( ! defined ( 'ABSPATH' ) ) {
exit ;
}
?>
2015-08-07 19:24:49 +00:00
2015-08-07 19:25:09 +00:00
< div class = " wc-tax-rates-search " id = " rates-search " >
2018-03-05 18:59:17 +00:00
< input type = " search " class = " wc-tax-rates-search-field " placeholder = " <?php esc_attr_e( 'Search…', 'woocommerce' ); ?> " value = " <?php echo isset( $_GET['s'] ) ? esc_attr( $_GET['s'] ) : ''; ?> " />
2015-08-07 19:25:09 +00:00
</ div >
2016-01-12 12:01:10 +00:00
< div id = " rates-pagination " ></ div >
2018-03-05 18:59:17 +00:00
< h3 >
< ? php
2016-10-29 10:51:56 +00:00
/* translators: %s: tax rate */
printf (
__ ( '"%s" tax rates' , 'woocommerce' ),
$current_class ? esc_html ( $current_class ) : __ ( 'Standard' , 'woocommerce' )
);
2018-03-05 18:59:17 +00:00
?>
</ h3 >
2015-08-07 19:25:09 +00:00
2016-07-27 09:22:02 +00:00
< table class = " wc_tax_rates wc_input_table widefat " >
2014-11-20 14:46:19 +00:00
< thead >
< tr >
2016-10-12 10:16:30 +00:00
< th width = " 8% " >< a href = " https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes " target = " _blank " >< ? php _e ( 'Country code' , 'woocommerce' ); ?> </a> <?php echo wc_help_tip( __( 'A 2 digit country code, e.g. US. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
2017-02-27 22:59:37 +00:00
< th width = " 8% " >< ? php _e ( 'State code' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'A 2 digit state code, e.g. AL. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
2016-10-11 01:39:13 +00:00
< th >< ? php _e ( 'Postcode / ZIP' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Postcode for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all areas. Wildcards (*) and ranges for numeric postcodes (e.g. 12345...12350) can also be used.', 'woocommerce' ) ); ?></th>
2015-10-23 15:09:08 +00:00
< th >< ? php _e ( 'City' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Cities for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all cities.', 'woocommerce' ) ); ?></th>
< th width = " 8% " >< ? php _e ( 'Rate %' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter a tax rate (percentage) to 4 decimal places.', 'woocommerce' ) ); ?></th>
2017-02-27 22:59:37 +00:00
< th width = " 8% " >< ? php _e ( 'Tax name' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Enter a name for this tax rate.', 'woocommerce' ) ); ?></th>
2015-10-23 15:09:08 +00:00
< th width = " 8% " >< ? php _e ( 'Priority' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Choose a priority for this tax rate. Only 1 matching rate per priority will be used. To define multiple tax rates for a single area you need to specify a different priority per rate.', 'woocommerce' ) ); ?></th>
< th width = " 8% " >< ? php _e ( 'Compound' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Choose whether or not this is a compound rate. Compound tax rates are applied on top of other tax rates.', 'woocommerce' ) ); ?></th>
< th width = " 8% " >< ? php _e ( 'Shipping' , 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Choose whether or not this tax rate also gets applied to shipping.', 'woocommerce' ) ); ?></th>
2014-11-20 14:46:19 +00:00
</ tr >
</ thead >
< tfoot >
< tr >
2016-07-27 09:22:02 +00:00
< th colspan = " 9 " >
2014-11-20 14:46:19 +00:00
< a href = " # " class = " button plus insert " >< ? php _e ( 'Insert row' , 'woocommerce' ); ?> </a>
< a href = " # " class = " button minus remove_tax_rates " >< ? php _e ( 'Remove selected row(s)' , 'woocommerce' ); ?> </a>
< a href = " # " download = " tax_rates.csv " class = " button export " >< ? php _e ( 'Export CSV' , 'woocommerce' ); ?> </a>
< a href = " <?php echo admin_url( 'admin.php?import=woocommerce_tax_rate_csv' ); ?> " class = " button import " >< ? php _e ( 'Import CSV' , 'woocommerce' ); ?> </a>
</ th >
</ tr >
</ tfoot >
2015-08-07 15:04:55 +00:00
< tbody id = " rates " >
2015-08-07 19:44:23 +00:00
< tr >
2016-07-27 09:22:02 +00:00
< th colspan = " 9 " style = " text-align: center; " >< ? php esc_html_e ( 'Loading…' , 'woocommerce' ); ?> </th>
2015-08-07 19:44:23 +00:00
</ tr >
2015-08-07 15:04:55 +00:00
</ tbody >
2014-11-20 14:46:19 +00:00
</ table >
2015-08-07 15:14:55 +00:00
< script type = " text/html " id = " tmpl-wc-tax-table-row " >
2017-03-13 05:39:46 +00:00
< tr class = " tips " data - tip = " <?php printf( esc_attr__( 'Tax rate ID: %s', 'woocommerce' ), ' { { data.tax_rate_id }}' ); ?> " data - id = " { { data.tax_rate_id }} " >
2015-08-07 15:04:55 +00:00
< td class = " country " >
2016-01-27 12:10:36 +00:00
< input type = " text " value = " { { data.tax_rate_country }} " placeholder = " * " name = " tax_rate_country[ { { data.tax_rate_id }}] " class = " wc_input_country_iso " data - attribute = " tax_rate_country " style = " text-transform:uppercase " />
2015-08-07 15:04:55 +00:00
</ td >
2014-11-20 14:46:19 +00:00
2015-08-07 15:04:55 +00:00
< td class = " state " >
2015-08-10 20:54:32 +00:00
< input type = " text " value = " { { data.tax_rate_state }} " placeholder = " * " name = " tax_rate_state[ { { data.tax_rate_id }}] " data - attribute = " tax_rate_state " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " postcode " >
2016-11-30 14:57:59 +00:00
< input type = " text " value = " <# if ( data.postcode ) print( _.escape( data.postcode.join( '; ' ) ) ); #> " placeholder = " * " data - name = " tax_rate_postcode[ { { data.tax_rate_id }}] " data - attribute = " postcode " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " city " >
2016-11-30 14:57:59 +00:00
< input type = " text " value = " <# if ( data.city ) print( _.escape( data.city.join( '; ' ) ) ); #> " placeholder = " * " data - name = " tax_rate_city[ { { data.tax_rate_id }}] " data - attribute = " city " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " rate " >
2017-08-21 11:49:23 +00:00
< input type = " text " value = " { { data.tax_rate }} " placeholder = " 0 " name = " tax_rate[ { { data.tax_rate_id }}] " data - attribute = " tax_rate " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " name " >
2015-08-10 20:54:32 +00:00
< input type = " text " value = " { { data.tax_rate_name }} " name = " tax_rate_name[ { { data.tax_rate_id }}] " data - attribute = " tax_rate_name " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " priority " >
2015-08-10 20:54:32 +00:00
< input type = " number " step = " 1 " min = " 1 " value = " { { data.tax_rate_priority }} " name = " tax_rate_priority[ { { data.tax_rate_id }}] " data - attribute = " tax_rate_priority " />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " compound " >
2015-08-10 21:21:52 +00:00
< input type = " checkbox " class = " checkbox " name = " tax_rate_compound[ { { data.tax_rate_id }}] " < # if ( parseInt( data.tax_rate_compound, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_compound" />
2015-08-07 15:04:55 +00:00
</ td >
< td class = " apply_to_shipping " >
2015-08-10 21:21:52 +00:00
< input type = " checkbox " class = " checkbox " name = " tax_rate_shipping[ { { data.tax_rate_id }}] " < # if ( parseInt( data.tax_rate_shipping, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_shipping" />
2015-08-07 15:04:55 +00:00
</ td >
</ tr >
</ script >
2014-11-20 14:46:19 +00:00
2015-08-12 19:29:17 +00:00
< script type = " text/html " id = " tmpl-wc-tax-table-row-empty " >
< tr >
2016-10-12 10:16:30 +00:00
< th colspan = " 9 " style = " text-align:center " >< ? php esc_html_e ( 'No matching tax rates found.' , 'woocommerce' ); ?> </th>
2015-08-12 19:29:17 +00:00
</ tr >
</ script >
2014-11-20 14:46:19 +00:00
2015-08-07 20:36:50 +00:00
< script type = " text/html " id = " tmpl-wc-tax-table-pagination " >
2015-08-12 17:52:04 +00:00
< div class = " tablenav " >
< div class = " tablenav-pages " >
2018-03-05 18:59:17 +00:00
< span class = " displaying-num " >
< ? php
2016-10-24 07:31:07 +00:00
/* translators: %s: number */
printf (
__ ( '%s items' , 'woocommerce' ), // %s will be a number eventually, but must be a string for now.
'{{ data.qty_rates }}'
);
2018-03-05 18:59:17 +00:00
?>
</ span >
2015-08-12 17:52:04 +00:00
< span class = " pagination-links " >
< a class = " tablenav-pages-navspan " data - goto = " 1 " >
< span class = " screen-reader-text " >< ? php esc_html_e ( 'First page' , 'woocommerce' ); ?> </span>
< span aria - hidden = " true " >& laquo ; </ span >
</ a >
< a class = " tablenav-pages-navspan " data - goto = " <# print( Math.max( 1, parseInt( data.current_page, 10 ) - 1 ) ) #> " >
< span class = " screen-reader-text " >< ? php esc_html_e ( 'Previous page' , 'woocommerce' ); ?> </span>
< span aria - hidden = " true " >& lsaquo ; </ span >
</ a >
< span class = " paging-input " >
2016-10-12 10:16:30 +00:00
< label for = " current-page-selector " class = " screen-reader-text " >< ? php esc_html_e ( 'Current page' , 'woocommerce' ); ?> </label>
2016-10-24 07:31:07 +00:00
< ? php
/* translators: 1: current page 2: total pages */
printf (
esc_html_x ( '%1$s of %2$s' , 'Pagination' , 'woocommerce' ),
'<input class="current-page" id="current-page-selector" type="text" name="paged" value="{{ data.current_page }}" size="<# print( data.qty_pages.toString().length ) #>" aria-describedby="table-paging">' ,
'<span class="total-pages">{{ data.qty_pages }}</span>'
);
?>
2015-08-12 17:52:04 +00:00
</ span >
< a class = " tablenav-pages-navspan " data - goto = " <# print( Math.min( data.qty_pages, parseInt( data.current_page, 10 ) + 1 ) ) #> " >
< span class = " screen-reader-text " >< ? php esc_html_e ( 'Next page' , 'woocommerce' ); ?> </span>
< span aria - hidden = " true " >& rsaquo ; </ span >
</ a >
< a class = " tablenav-pages-navspan " data - goto = " { { data.qty_pages }} " >
< span class = " screen-reader-text " >< ? php esc_html_e ( 'Last page' , 'woocommerce' ); ?> </span>
< span aria - hidden = " true " >& raquo ; </ span >
</ a >
2015-08-07 20:36:50 +00:00
2015-08-12 17:52:04 +00:00
</ span >
</ div >
2015-08-07 20:36:50 +00:00
</ div >
2014-11-20 14:46:19 +00:00
</ script >