Zone wording tweaks

Closes #11184
This commit is contained in:
Mike Jolley 2016-06-20 12:50:52 +01:00
parent c626747cbd
commit e1ec01c9f9
7 changed files with 37 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@ -2556,13 +2556,18 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
}
.wc-backbone-modal .wc-shipping-zone-method-selector {
padding: 2px;
p {
margin-top: 0;
}
.wc-shipping-zone-method-description {
margin: 1em 0;
margin: .75em 1px 0;
line-height: 1.5em;
color: #999;
font-style: italic;
}
select {
width: 100%;
cursor: pointer;
}
}
@ -4941,7 +4946,7 @@ table.bar_chart {
}
.wc-backbone-modal-main {
padding-bottom: 51px;
padding-bottom: 55px;
header,
article {
@ -4950,23 +4955,23 @@ table.bar_chart {
}
.wc-backbone-modal-header {
height: 50px;
height: auto;
background: #fcfcfc;
padding: 0 50px 0 16px;
padding: 1em 1.5em;
border-bottom: 1px solid #ddd;
h1 {
margin: 0;
font-size: 18px;
font-weight: 700;
line-height: 50px;
line-height: 1.5em;
}
.modal-close-link {
cursor: pointer;
color: #777;
height: 50px;
width: 50px;
height: 54px;
width: 54px;
padding: 0;
position: absolute;
top: 0;
@ -5000,8 +5005,18 @@ table.bar_chart {
}
article {
padding: 10px 16px;
padding: 1.5em;
p {
margin: 1.5em 0;
}
p:first-child {
margin-top: 0;
}
p:last-child {
margin-bottom: 0;
}
.pagination {
padding: 10px 0 0;
text-align: center;
@ -5014,7 +5029,7 @@ table.bar_chart {
right: 0;
bottom: 0;
z-index: 100;
padding: 10px 16px;
padding: 1em 1.5em;
background: #fcfcfc;
border-top: 1px solid #dfdfdf;
box-shadow: 0 -4px 4px -4px rgba(0,0,0,0.1);

View File

@ -219,7 +219,7 @@
$method_list.prepend( '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' + instance_id + '" class="' + class_name + '">' + shipping_method.title + '</a></li>' );
} );
} else {
$method_list.prepend( '<li class="wc-shipping-zone-method">&ndash;</li>' );
$method_list.prepend( '<li class="wc-shipping-zone-method">' + data.strings.no_shipping_methods_offered + '</li>' );
}
},
onSubmit: function( event ) {

File diff suppressed because one or more lines are too long

View File

@ -239,8 +239,9 @@ class WC_Settings_Shipping extends WC_Settings_Page {
),
'wc_shipping_zones_nonce' => wp_create_nonce( 'wc_shipping_zones_nonce' ),
'strings' => array(
'unload_confirmation_msg' => __( 'Your changed data will be lost if you leave this page without saving.', 'woocommerce' ),
'save_failed' => __( 'Your changes were not saved. Please retry.', 'woocommerce' ),
'unload_confirmation_msg' => __( 'Your changed data will be lost if you leave this page without saving.', 'woocommerce' ),
'save_failed' => __( 'Your changes were not saved. Please retry.', 'woocommerce' ),
'no_shipping_methods_offered' => __( 'No shipping methods offered to this zone.', 'woocommerce' ),
),
) );
wp_enqueue_script( 'wc-shipping-zones' );

View File

@ -98,6 +98,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<article>
<form action="" method="post">
<div class="wc-shipping-zone-method-selector">
<p><?php esc_html_e( 'Choose the shipping method you wish to add. Only shipping methods which support zones are listed.', 'woocommerce' ); ?></p>
<select name="add_method_id">
<?php
foreach ( WC()->shipping->load_shipping_methods() as $method ) {

View File

@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<a href="admin.php?page=wc-settings&amp;tab=shipping&amp;zone_id={{ data.zone_id }}"><?php _e( 'View', 'woocommerce' ); ?></a>
</div>
</td>
<td class="wc-shipping-zone-region"><?php esc_html_e( 'Shipping Methods added here will apply to shipping addresses that aren&lsquo;t included in any other shipping zone.', 'woocommerce' ); ?></td>
<td class="wc-shipping-zone-region"><?php esc_html_e( 'This zone is used for shipping addresses that aren&lsquo;t included in any other shipping zone. Adding shipping methods to this zone is optional.', 'woocommerce' ); ?></td>
<td class="wc-shipping-zone-methods">
<ul>
<?php
@ -49,7 +49,7 @@ if ( ! defined( 'ABSPATH' ) ) {
echo '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' . absint( $method->instance_id ) . '" class="' . esc_attr( $class_name ) . '">' . esc_html( $method->get_title() ) . '</a></li>';
}
} else {
echo '<li class="wc-shipping-zone-method">&ndash;</li>';
echo '<li class="wc-shipping-zone-method">' . __( 'No shipping methods offered to this zone.', 'woocommerce' ) . '</li>';
}
?>
<li class="wc-shipping-zone-methods-add-row"><a href="#" class="add_shipping_method tips" data-tip="<?php esc_attr_e( 'Add shipping method', 'woocommerce' ); ?>" data-disabled-tip="<?php esc_attr_e( 'Save changes to continue adding shipping methods to this zone', 'woocommerce' ); ?>"><?php _e( 'Add shipping method', 'woocommerce' ); ?></a></li>
@ -146,6 +146,8 @@ if ( ! defined( 'ABSPATH' ) ) {
<article>
<form action="" method="post">
<div class="wc-shipping-zone-method-selector">
<p><?php esc_html_e( 'Choose the shipping method you wish to add. Only shipping methods which support zones are listed.', 'woocommerce' ); ?></p>
<select name="add_method_id">
<?php
foreach ( WC()->shipping->load_shipping_methods() as $method ) {