block.json
5 months ago
controller.php
5 months ago
index-rtl.css
5 months ago
index.asset.php
5 months ago
index.css
5 months ago
index.js
5 months ago
legacy.php
5 months ago
style-index-rtl.css
5 months ago
style-index.css
5 months ago
upsell-quantity.php
1 year ago
view.php
5 months ago
legacy.php
55 lines
| 1 | <div <?php echo wp_kses_data( get_block_wrapper_attributes() ); ?>> |
| 2 | <?php if ( empty( $attributes['hidden_label'] ) ) : ?> |
| 3 | <label for="sc-quantity" class="sc-form-label"> |
| 4 | <?php echo wp_kses_post( $attributes['label'] ?? esc_html__( 'Quantity', 'surecart' ) ); ?> |
| 5 | </label> |
| 6 | <?php endif; ?> |
| 7 | |
| 8 | <div |
| 9 | class="sc-input-group sc-quantity-selector" |
| 10 | data-wp-class--quantity--disabled="state.isQuantityDisabled" |
| 11 | style="<?php echo esc_attr( $styles['css'] ?? '' ); ?>" |
| 12 | > |
| 13 | <div |
| 14 | class="sc-input-group-text sc-quantity-selector__decrease" |
| 15 | role="button" |
| 16 | tabindex="0" |
| 17 | data-wp-on--click="callbacks.onQuantityDecrease" |
| 18 | data-wp-bind--disabled="state.isQuantityDecreaseDisabled" |
| 19 | data-wp-bind--aria-disabled="state.isQuantityDecreaseDisabled" |
| 20 | data-wp-class--button--disabled="state.isQuantityDecreaseDisabled" |
| 21 | aria-label="<?php echo esc_html__( 'Decrease quantity by one.', 'surecart' ); ?>" |
| 22 | data-wp-on--keydown="callbacks.onQuantityDecrease" |
| 23 | > |
| 24 | <?php echo wp_kses( SureCart::svg()->get( 'minus' ), sc_allowed_svg_html() ); ?> |
| 25 | </div> |
| 26 | <input |
| 27 | id="sc-quantity" |
| 28 | type="number" |
| 29 | class="sc-form-control sc-quantity-selector__control" |
| 30 | data-wp-bind--value="context.quantity" |
| 31 | data-wp-on--change="callbacks.onQuantityChange" |
| 32 | data-wp-bind--disabled="state.isQuantityDisabled" |
| 33 | data-wp-bind--aria-disabled="state.isQuantityDisabled" |
| 34 | min="1" |
| 35 | step="1" |
| 36 | autocomplete="off" |
| 37 | role="spinbutton" |
| 38 | aria-label="<?php echo esc_attr( $attributes['label'] ?? esc_html__( 'Quantity', 'surecart' ) ); ?>" |
| 39 | /> |
| 40 | <div |
| 41 | class="sc-input-group-text sc-quantity-selector__increase" |
| 42 | role="button" |
| 43 | tabindex="0" |
| 44 | data-wp-on--click="callbacks.onQuantityIncrease" |
| 45 | data-wp-bind--disabled="state.isQuantityIncreaseDisabled" |
| 46 | data-wp-bind--aria-disabled="state.isQuantityIncreaseDisabled" |
| 47 | data-wp-class--button--disabled="state.isQuantityIncreaseDisabled" |
| 48 | aria-label="<?php echo esc_html__( 'Increase quantity by one.', 'surecart' ); ?>" |
| 49 | data-wp-on--keydown="callbacks.onQuantityIncrease" |
| 50 | > |
| 51 | <?php echo wp_kses( SureCart::svg()->get( 'plus' ), sc_allowed_svg_html() ); ?> |
| 52 | </div> |
| 53 | </div> |
| 54 | </div> |
| 55 |