PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | templates/partials/booking-auth.php +16 -2 3.0.5.1 → 3.0.16 View file →
@@ -12,8 +12,16 @@
12 12 }
13 13
14 14 global $booking;
15 15 $trip = $booking->trip ?? null;
16 +
17 +// Account registration is gated by the same setting the backend enforces
18 +// (AuthController rejects registration when this is off). When it's disabled we
19 +// hide the Register tab/form and the "Register now" switch so customers only
20 +// see the Login option.
21 +$registration_enabled = class_exists('\\Yatra\\Services\\SettingsService')
22 + ? \Yatra\Services\SettingsService::isEnabled('customer_registration')
23 + : true;
16 24 ?>
17 25
18 26 <div class="yatra-booking-auth">
19 27 <!-- Tab Navigation -->
@@ -23,8 +31,9 @@
23 31 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"/>
24 32 </svg>
25 33 <?php esc_html_e('Login', 'yatra'); ?>
26 34 </button>
35 + <?php if ($registration_enabled) : ?>
27 36 <button type="button" class="yatra-auth-tab" data-tab="register">
28 37 <svg width="18" height="18" fill="none" stroke="currentColor" viewBox="0 0 24 24">
29 38 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
30 39 </svg>
@@ -29,8 +38,9 @@
29 38 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"/>
30 39 </svg>
31 40 <?php esc_html_e('Register', 'yatra'); ?>
32 41 </button>
42 + <?php endif; ?>
33 43 </div>
34 44
35 45 <!-- Login Form -->
36 46 <div class="yatra-auth-content" id="yatra-auth-login">
@@ -105,15 +115,18 @@
105 115 </span>
106 116 </button>
107 117 </form>
108 118
119 + <?php if ($registration_enabled) : ?>
109 120 <div class="yatra-auth-footer">
110 - <p><?php esc_html_e("Don't have an account?", 'yatra'); ?>
121 + <p><?php esc_html_e("Don't have an account?", 'yatra'); ?>
111 122 <button type="button" class="yatra-switch-tab" data-tab="register"><?php esc_html_e('Register now', 'yatra'); ?></button>
112 123 </p>
113 124 </div>
125 + <?php endif; ?>
114 126 </div>
115 127
128 + <?php if ($registration_enabled) : ?>
116 129 <!-- Registration Form -->
117 130 <div class="yatra-auth-content" id="yatra-auth-register" style="display:none;">
118 131 <div class="yatra-auth-header">
119 132 <h2><?php esc_html_e('Create Account', 'yatra'); ?></h2>
@@ -249,10 +262,11 @@
249 262 </button>
250 263 </form>
251 264
252 265 <div class="yatra-auth-footer">
253 - <p><?php esc_html_e('Already have an account?', 'yatra'); ?>
266 + <p><?php esc_html_e('Already have an account?', 'yatra'); ?>
254 267 <button type="button" class="yatra-switch-tab" data-tab="login"><?php esc_html_e('Login here', 'yatra'); ?></button>
255 268 </p>
256 269 </div>
257 270 </div>
271 + <?php endif; ?>
258 272 </div>