← All changes
|
src/Addons/RequestAQuote/views/frontend/integrated/options.php
+25
-8
7.1.1
→
8.0.2
View file →
| @@ -11,23 +11,40 @@ | ||
| 11 | 11 | */ |
| 12 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | 13 | exit; |
| 14 | 14 | } |
| 15 | + | |
| 16 | +// styles that wrap the option content in an inner box; style 5 also has a head row, style 6 a main column | |
| 17 | +$hasInner = in_array( $optionsStyle, array( 'style-3', 'style-4' ), true ); | |
| 18 | +$hasHead = 'style-4' === $optionsStyle; | |
| 19 | +$hasMain = 'style-5' === $optionsStyle; | |
| 15 | 20 | ?> |
| 16 | 21 | <div class="tiered-pricing-option tpt-request-quote-integrated-option" |
| 17 | 22 | onclick="document.getElementById('tpt-raq-link-<?php echo esc_attr( $productId ); ?>').click();"> |
| 18 | 23 | |
| 19 | - <?php if ( in_array( $optionsStyle, array( 'style-3', 'style-4' ) ) ): ?> | |
| 24 | + <?php if ( $hasInner ) : ?> | |
| 20 | 25 | <div class="tiered-pricing-option-inner"> |
| 26 | + <?php endif; ?> | |
| 27 | + | |
| 28 | + <?php if ( $hasHead ) : ?> | |
| 29 | + <div class="tiered-pricing-option__head"> | |
| 21 | 30 | <?php endif; ?> |
| 22 | - | |
| 23 | - <div class="tiered-pricing-option__checkbox"> | |
| 24 | - <div class="tiered-pricing-option-checkbox"></div> | |
| 31 | + <div class="tiered-pricing-option__checkbox"> | |
| 32 | + <div class="tiered-pricing-option-checkbox"></div> | |
| 33 | + </div> | |
| 34 | + <?php if ( $hasHead ) : ?> | |
| 25 | 35 | </div> |
| 36 | + <?php endif; ?> | |
| 26 | 37 | |
| 27 | - <div class="tiered-pricing-option__quantity"> | |
| 28 | - <strong><?php echo esc_html( $form->getIntegratedLabelText() ); ?></strong> | |
| 38 | + <?php if ( $hasMain ) : ?> | |
| 39 | + <div class="tiered-pricing-option__main"> | |
| 40 | + <?php endif; ?> | |
| 41 | + <div class="tiered-pricing-option__quantity"> | |
| 42 | + <strong><?php echo esc_html( $form->getIntegratedLabelText() ); ?></strong> | |
| 43 | + </div> | |
| 44 | + <?php if ( $hasMain ) : ?> | |
| 29 | 45 | </div> |
| 46 | + <?php endif; ?> | |
| 30 | 47 | |
| 31 | 48 | <div class="tiered-pricing-option__pricing"> |
| 32 | 49 | <div class="tiered-pricing-option-price"> |
| 33 | 50 | <?php echo wp_kses_post( $buttonHtml ); ?> |
| @@ -33,8 +50,8 @@ | ||
| 33 | 50 | <?php echo wp_kses_post( $buttonHtml ); ?> |
| 34 | 51 | </div> |
| 35 | 52 | </div> |
| 36 | 53 | |
| 37 | - <?php if ( in_array( $optionsStyle, array( 'style-3', 'style-4' ) ) ): ?> | |
| 54 | + <?php if ( $hasInner ) : ?> | |
| 38 | 55 | </div> |
| 39 | -<?php endif; ?> | |
| 56 | + <?php endif; ?> | |
| 40 | 57 | </div> |