From: soufiane Date: Tue, 25 Feb 2025 15:10:35 +0000 (+0100) Subject: wait #7330 @4:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=19534d88458e52f5d5f61b315023815ea2720137;p=physioassist-wordpress.git wait #7330 @4:00 --- diff --git a/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js b/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js index a2475c22..f84b270f 100644 --- a/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js +++ b/wp-content/themes/physioassist/resources/assets/scripts/routes/common.js @@ -72,6 +72,40 @@ export default { const isApp = window.location.search.substring(1).split("&").includes("app=true") if(isApp) $("button[name=update_cart]").trigger("click") }) + + // + function addParam(url) { + if(url.indexOf('?') > -1) { + url += "&app=true" + }else{ + url += "?app=true" + } + return url + } + + if($("html").attr('data-app') === "on") { + let attr = null + $("a:not([role=tab]),form").each(function(){ + if($(this).prop("tagName").toLowerCase() === 'a') { + attr = "href" + }else if($(this).prop("tagName").toLowerCase() === 'form') { + attr = "action" + } + let newUrl = addParam($(this).attr(attr)) + $(this).attr(attr, newUrl) + }) + + $("[for=billing_address_2],[for=shipping_address_2]").removeClass("screen-reader-text") + + if($(".tax_label")){ + if($(".tax_label").length > 0){ + $(".tax_label").each(function(){ + let newText = $(this).text().replace(/[()]/g,"") + $(this).text(newText) + }) + } + } + } }, finalize() { // JavaScript to be fired on all pages, after page specific JS is fired diff --git a/wp-content/themes/physioassist/resources/assets/styles/common/app.styl b/wp-content/themes/physioassist/resources/assets/styles/common/app.styl index 40fa11d7..0708d82b 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/common/app.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/common/app.styl @@ -5,6 +5,9 @@ color: #1B2943 line-height: normal + strong + font-weight: $semibold + .content-inner horizontal-spacing(16px) padding-top: 0 @@ -411,7 +414,7 @@ border-bottom: 1px solid rgba(#8E94A1,.5) .place-order padding: 0 !important - margin: 0 + margin: 0 !important .woocommerce-checkout-payment-button margin-top: 16px @@ -455,8 +458,10 @@ max-width: 188px font-weight: 600 margin-bottom: 8px - .quantity, small + .quantity font-size: 16px + small + font-size: inherit .order-total font-size: 22px h4,ul:not(.woocommerce-shipping-methods) diff --git a/wp-content/themes/physioassist/resources/views/woocommerce/checkout/payment.blade.php b/wp-content/themes/physioassist/resources/views/woocommerce/checkout/payment.blade.php index b70e552c..3c31c572 100644 --- a/wp-content/themes/physioassist/resources/views/woocommerce/checkout/payment.blade.php +++ b/wp-content/themes/physioassist/resources/views/woocommerce/checkout/payment.blade.php @@ -16,8 +16,8 @@ */ defined( 'ABSPATH' ) || exit; - if ( ! wp_doing_ajax() ) { + $app = filter_input(INPUT_GET, 'app', FILTER_SANITIZE_STRING); do_action( 'woocommerce_review_order_before_payment' ); } ?> @@ -50,9 +50,19 @@ if ( ! wp_doing_ajax() ) { +
+ + ' . esc_html( $order_button_text ) . '' ); // @codingStandardsIgnoreLine ?> + + + + +
-
+
' . esc_html( $order_button_text ) . '' ); // @codingStandardsIgnoreLine ?> @@ -61,9 +71,9 @@ if ( ! wp_doing_ajax() ) {
+if ( ! wp_doing_ajax() ) { ?>