adding timezone
This commit is contained in:
parent
a361ed7269
commit
b21d7e9d88
@ -89,7 +89,7 @@ render_header('Integrations', 'admin', true);
|
||||
</div>
|
||||
<div class="col-md-10 p-4">
|
||||
<div class="page-intro mb-4">
|
||||
<h1 class="section-title mb-1">Integrations</h1>
|
||||
<h1 class="section-title mb-1"><?= e(t('integrations')) ?></h1>
|
||||
<p class="muted mb-0">Manage your payment gateway and communication APIs.</p>
|
||||
</div>
|
||||
|
||||
@ -116,7 +116,7 @@ render_header('Integrations', 'admin', true);
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="whatsapp-tab" data-bs-toggle="tab" data-bs-target="#whatsapp" type="button" role="tab" aria-controls="whatsapp" aria-selected="false">
|
||||
Whatsapp Setting
|
||||
<?= e(t('whatsapp_settings')) ?>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
@ -170,7 +170,7 @@ render_header('Integrations', 'admin', true);
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-whatsapp me-2 text-success" viewBox="0 0 16 16">
|
||||
<path d="M13.601 2.326A7.85 7.85 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.9 7.9 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.9 7.9 0 0 0 13.6 2.326zM7.994 14.521a6.6 6.6 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.56 6.56 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592m3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.73.73 0 0 0-.529.247c-.182.198-.691.677-.691 1.654s.71 1.916.81 2.049c.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232"/>
|
||||
</svg>
|
||||
Wablas WhatsApp Gateway
|
||||
<?= e(t('whatsapp_settings')) ?>
|
||||
</h3>
|
||||
<p class="text-muted small mb-4">Connect Wablas to automatically send WhatsApp notifications to Shippers and Truck Owners.</p>
|
||||
|
||||
@ -178,18 +178,18 @@ render_header('Integrations', 'admin', true);
|
||||
<div class="col-12 mb-3">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="whatsapp_enabled" id="whatsapp_enabled" value="1" <?= $whatsappEnabled === '1' ? 'checked' : '' ?>>
|
||||
<label class="form-check-label fw-bold" for="whatsapp_enabled">Enable WhatsApp Notifications</label>
|
||||
<label class="form-check-label fw-bold" for="whatsapp_enabled"><?= e(t('enable_whatsapp')) ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Wablas Server Domain</label>
|
||||
<label class="form-label fw-bold"><?= e(t('wablas_domain')) ?></label>
|
||||
<input type="text" name="wablas_domain" class="form-control" value="<?= e($wablasDomain) ?>" placeholder="e.g. https://solo.wablas.com">
|
||||
<div class="form-text">Your assigned server node from the Wablas dashboard.</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">API Token</label>
|
||||
<label class="form-label fw-bold"><?= e(t('wablas_api_token')) ?></label>
|
||||
<input type="password" name="wablas_api_token" class="form-control" value="<?= e($wablasToken) ?>" placeholder="API Token">
|
||||
</div>
|
||||
|
||||
|
||||
@ -15,9 +15,12 @@ try {
|
||||
('platform_charge_percentage', '0'),
|
||||
('logo_path', ''),
|
||||
('favicon_path', ''),
|
||||
('timezone', 'UTC');
|
||||
('timezone', 'UTC'),
|
||||
('whatsapp_enabled', '0'),
|
||||
('wablas_domain', ''),
|
||||
('wablas_api_token', '');
|
||||
");
|
||||
echo "Settings table created/updated.\n";
|
||||
} catch (Exception $e) {
|
||||
echo "Error: " . $e->getMessage() . "\n";
|
||||
}
|
||||
}
|
||||
@ -256,6 +256,10 @@ $translations = [
|
||||
'send_reset_link' => 'Send Reset Link',
|
||||
'back_to_login' => 'Back to Login',
|
||||
'timezone' => 'Timezone',
|
||||
'whatsapp_settings' => 'WhatsApp Settings',
|
||||
'enable_whatsapp' => 'Enable WhatsApp Notifications',
|
||||
'wablas_domain' => 'Wablas Domain',
|
||||
'wablas_api_token' => 'Wablas API Token',
|
||||
),
|
||||
"ar" => array (
|
||||
'app_name' => 'CargoLink',
|
||||
@ -500,6 +504,10 @@ $translations = [
|
||||
'send_reset_link' => 'إرسال رابط إعادة التعيين',
|
||||
'back_to_login' => 'العودة لتسجيل الدخول',
|
||||
'timezone' => 'المنطقة الزمنية',
|
||||
'whatsapp_settings' => 'إعدادات واتساب',
|
||||
'enable_whatsapp' => 'تفعيل إشعارات واتساب',
|
||||
'wablas_domain' => 'نطاق Wablas',
|
||||
'wablas_api_token' => 'رمز API لـ Wablas',
|
||||
)
|
||||
];
|
||||
|
||||
@ -667,8 +675,7 @@ function get_settings(): array
|
||||
while ($row = $stmt->fetch()) {
|
||||
$settings[$row['setting_key']] = $row['setting_value'];
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
}
|
||||
} catch (Throwable $e) {}
|
||||
return $settings;
|
||||
}
|
||||
|
||||
@ -721,4 +728,4 @@ try {
|
||||
if ($tz && in_array($tz, DateTimeZone::listIdentifiers())) {
|
||||
date_default_timezone_set($tz);
|
||||
}
|
||||
} catch (Throwable $e) {}
|
||||
} catch (Throwable $e) {}
|
||||
Loading…
x
Reference in New Issue
Block a user