| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
// Simple Traveler Input for Regular Pricing (NO DROPDOWN) |
| 7 |
// Expected variables: $input_id, $input_name, $value, $min, $max |
| 8 |
?> |
| 9 |
<div class="yatra-booking-travelers-simple"> |
| 10 |
<div class="yatra-booking-field-icon"> |
| 11 |
<?php echo yatra_svg_icon('users', 'yatra-icon-sm'); ?> |
| 12 |
</div> |
| 13 |
<div class="yatra-quantity-controls-inline"> |
| 14 |
<button type="button" class="yatra-quantity-btn yatra-quantity-minus" data-target="<?php echo esc_attr($input_id); ?>" aria-label="<?php esc_attr_e('Decrease travelers', 'yatra'); ?>"> |
| 15 |
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 16 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 12H4"/> |
| 17 |
</svg> |
| 18 |
</button> |
| 19 |
<input type="number" |
| 20 |
id="<?php echo esc_attr($input_id); ?>" |
| 21 |
name="<?php echo esc_attr($input_name); ?>" |
| 22 |
class="yatra-quantity-input-simple" |
| 23 |
value="<?php echo esc_attr($value); ?>" |
| 24 |
min="<?php echo esc_attr($min); ?>" |
| 25 |
max="<?php echo esc_attr($max); ?>" |
| 26 |
readonly |
| 27 |
<?php echo isset($data_price) ? 'data-price="' . esc_attr($data_price) . '"' : ''; ?>> |
| 28 |
<button type="button" class="yatra-quantity-btn yatra-quantity-plus" data-target="<?php echo esc_attr($input_id); ?>" aria-label="<?php esc_attr_e('Increase travelers', 'yatra'); ?>"> |
| 29 |
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 30 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/> |
| 31 |
</svg> |
| 32 |
</button> |
| 33 |
</div> |
| 34 |
<?php if (isset($min, $max)): ?> |
| 35 |
<span class="yatra-travelers-range"><?php |
| 36 |
// Separate short labels so Loco/po files can translate "Min" / "Max" without a long combined msgid. |
| 37 |
// Colons are literal (not part of the translatable strings). |
| 38 |
echo esc_html( |
| 39 |
__('Min', 'yatra') . ': ' . (int) $min . ', ' . __('Max', 'yatra') . ': ' . (int) $max |
| 40 |
); |
| 41 |
?></span> |
| 42 |
<?php endif; ?> |
| 43 |
</div> |
| 44 |
|