feat(121+122): smsplanet conversation, notifications, default footer
Phase 121 — SMSPLANET Conversation + Notifications:
- migration 20260512_000110 adds smsplanet conversation + notifications tables
- src/Modules/Sms (SmsConversationService, SmsMessageRepository, SmsplanetWebhookController)
- src/Modules/Notifications (Repository, Controller, ApiController)
- order SMS tab, notification center, sender mode, inbound webhook
- public notifications.js + layouts/app.php integration
Phase 122 — SMSPLANET Default SMS Footer:
- migration 20260512_000111 adds smsplanet_integration_settings.default_footer
- footer appended to test SMS and order SMS, validated against 918 char limit
- settings textarea + compact order SMS note when footer configured
Bundled (could not split per-phase without hunk staging):
- routes/web.php (also carries Phase 118 fakturownia redirects)
- DOCS/{ARCHITECTURE,DB_SCHEMA,TECH_CHANGELOG}.md (118 + 121 + 122 entries)
- .paul/codebase/{architecture,db_schema,tech_changelog}.md (118 + 121 + 122)
- .paul/STATE.md, ROADMAP.md, changelog/2026-05-12.md (UNIFY closure)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,16 @@ return [
|
||||
'accounting_section' => 'Ksiegowosc',
|
||||
'project_mapping' => 'Mapowanie projektow',
|
||||
],
|
||||
'notifications' => [
|
||||
'title' => 'Powiadomienia',
|
||||
'description' => 'Historia zdarzen wymagajacych uwagi operatora.',
|
||||
'empty' => 'Brak powiadomien.',
|
||||
'actions' => [
|
||||
'open' => 'Otworz',
|
||||
'mark_read' => 'Oznacz jako przeczytane',
|
||||
'mark_all_read' => 'Oznacz wszystkie jako przeczytane',
|
||||
],
|
||||
],
|
||||
'marketplace' => [
|
||||
'title' => 'Marketplace',
|
||||
'description' => 'Aktywne integracje i powiazane oferty marketplace.',
|
||||
@@ -155,6 +165,17 @@ return [
|
||||
'shipments' => 'Przesylki',
|
||||
'payments' => 'Platnosci',
|
||||
'documents' => 'Dokumenty powiazane',
|
||||
'sms' => 'SMS',
|
||||
],
|
||||
'sms' => [
|
||||
'title' => 'Rozmowa SMS',
|
||||
'empty' => 'Brak wiadomosci SMS dla tego zamowienia.',
|
||||
'inbound' => 'Klient',
|
||||
'outbound' => 'Operator',
|
||||
'phone' => 'Numer klienta',
|
||||
'message' => 'Tresc SMS',
|
||||
'footer_note' => 'Skonfigurowana stopka SMSPLANET zostanie dodana automatycznie.',
|
||||
'send' => 'Wyslij SMS',
|
||||
],
|
||||
'items_title' => 'Pozycje',
|
||||
'item_name' => 'Nazwa',
|
||||
@@ -783,6 +804,9 @@ return [
|
||||
'api_key' => 'Klucz API',
|
||||
'api_password' => 'Haslo API',
|
||||
'sender' => 'Pole nadawcy / from',
|
||||
'sender_mode' => 'Tryb nadawcy',
|
||||
'sender_phone' => 'Numer 2WAY',
|
||||
'default_footer' => 'Domyslna stopka SMS',
|
||||
'options' => 'Opcje wysylki',
|
||||
'clear_polish' => 'Zamien polskie znaki na odpowiedniki GSM',
|
||||
'transactional' => 'Wysylka kanalem transakcyjnym',
|
||||
@@ -802,9 +826,17 @@ return [
|
||||
'saved' => 'Haslo API jest zapisane. Pozostaw pole puste, aby nie zmieniac.',
|
||||
'missing' => 'Brak zapisanego hasla API.',
|
||||
],
|
||||
'sender_modes' => [
|
||||
'text' => 'Nadpis',
|
||||
'phone' => 'Numer 2WAY',
|
||||
],
|
||||
'hints' => [
|
||||
'auth_method' => 'SMSPLANET zaleca token Bearer, ale API obsluguje tez klucz i haslo.',
|
||||
'sender' => 'Pole nadawcy musi byc dostepne na koncie SMSPLANET albo miec wartosc testowa dopuszczona przez provider.',
|
||||
'sender_mode' => 'Tryb decyduje, ktora wartosc trafi do pola from w SMSPLANET.',
|
||||
'sender_phone' => 'Numer 2WAY uzywany do dwukierunkowej rozmowy SMS.',
|
||||
'default_footer' => 'Opcjonalna stopka dopisywana do testowych SMS i SMS z rozmowy w zamowieniu. Limit: 300 znakow.',
|
||||
'test_footer' => 'Do testowego SMS zostanie dodana zapisana stopka.',
|
||||
],
|
||||
'status' => [
|
||||
'secret' => 'Sekret API',
|
||||
|
||||
@@ -2126,6 +2126,137 @@ details[open] > .order-statuses-side__title .order-statuses-side__arrow {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.order-sms-head,
|
||||
.notifications-page__head {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.order-sms-thread {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.order-sms-bubble {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
max-width: 76%;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.order-sms-bubble--outbound {
|
||||
align-self: flex-end;
|
||||
background: #ecfdf5;
|
||||
border-color: #bbf7d0;
|
||||
}
|
||||
|
||||
.order-sms-bubble--inbound {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.order-sms-bubble__meta {
|
||||
color: #64748b;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.order-sms-bubble__body {
|
||||
color: #0f172a;
|
||||
font-size: 14px;
|
||||
line-height: 1.35;
|
||||
margin: 4px 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.order-sms-form {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.topbar-notifications {
|
||||
align-items: center;
|
||||
border: 1px solid #dbe4ef;
|
||||
border-radius: 8px;
|
||||
color: #334155;
|
||||
display: inline-flex;
|
||||
height: 34px;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.topbar-notifications:hover {
|
||||
background: #f8fafc;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.topbar-notifications__badge {
|
||||
align-items: center;
|
||||
background: #dc2626;
|
||||
border-radius: 999px;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
height: 18px;
|
||||
justify-content: center;
|
||||
min-width: 18px;
|
||||
padding: 0 5px;
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
.notifications-list {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
align-items: center;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: space-between;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.notification-row--unread {
|
||||
background: #f8fafc;
|
||||
border-color: #93c5fd;
|
||||
}
|
||||
|
||||
.notification-row__title {
|
||||
color: #0f172a;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.notification-row__body {
|
||||
color: #334155;
|
||||
margin-top: 3px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.notification-row__meta {
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.notification-row__actions {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.manual-tracking-form {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
@@ -2753,6 +2884,26 @@ details[open] > .order-statuses-side__title .order-statuses-side__arrow {
|
||||
accent-color: var(--c-action-primary);
|
||||
}
|
||||
|
||||
.smsplanet-sender-phone-field {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.smsplanet-default-footer-field {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.smsplanet-default-footer-field textarea {
|
||||
min-height: 78px;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.order-sms-footer-note {
|
||||
color: #64748b;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
// Hamburger button (hidden on desktop)
|
||||
.topbar__hamburger {
|
||||
display: none;
|
||||
@@ -2934,6 +3085,14 @@ body.no-scroll {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.smsplanet-sender-phone-field {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.smsplanet-default-footer-field {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@@ -177,6 +177,13 @@
|
||||
<div>
|
||||
<strong><?= $e((string) (($user['name'] ?? '') !== '' ? $user['name'] : ($user['email'] ?? ''))) ?></strong>
|
||||
</div>
|
||||
<a class="topbar-notifications" href="/notifications" id="js-notification-button" title="<?= $e($t('notifications.title')) ?>" aria-label="<?= $e($t('notifications.title')) ?>">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<path d="M18 8a6 6 0 10-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9"/>
|
||||
<path d="M13.73 21a2 2 0 01-3.46 0"/>
|
||||
</svg>
|
||||
<span class="topbar-notifications__badge" id="js-notification-badge" hidden>0</span>
|
||||
</a>
|
||||
<form action="/logout" method="post">
|
||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||
<button type="submit" class="btn btn--secondary"><?= $e($t('actions.logout')) ?></button>
|
||||
@@ -206,6 +213,7 @@
|
||||
<script src="/assets/js/modules/invoice-requested-toggle.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/invoice-requested-toggle.js') ?: 0 ?>"></script>
|
||||
<script src="/assets/js/modules/confirm-delete.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/confirm-delete.js') ?: 0 ?>"></script>
|
||||
<script src="/assets/js/modules/alert-dismiss.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/alert-dismiss.js') ?: 0 ?>"></script>
|
||||
<script src="/assets/js/modules/notifications.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/notifications.js') ?: 0 ?>"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
|
||||
<script src="/assets/js/modules/statistics-summary-charts.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/statistics-summary-charts.js') ?: 0 ?>"></script>
|
||||
<script>
|
||||
|
||||
67
resources/views/notifications/index.php
Normal file
67
resources/views/notifications/index.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
$items = is_array($notifications ?? null) ? $notifications : [];
|
||||
$pageData = is_array($pagination ?? null) ? $pagination : ['page' => 1, 'per_page' => 30, 'total' => 0];
|
||||
$page = max(1, (int) ($pageData['page'] ?? 1));
|
||||
$perPage = max(1, (int) ($pageData['per_page'] ?? 30));
|
||||
$total = max(0, (int) ($pageData['total'] ?? 0));
|
||||
$totalPages = max(1, (int) ceil($total / $perPage));
|
||||
?>
|
||||
|
||||
<section class="card notifications-page">
|
||||
<div class="notifications-page__head">
|
||||
<div>
|
||||
<h2 class="section-title"><?= $e($t('notifications.title')) ?></h2>
|
||||
<p class="muted mt-8"><?= $e($t('notifications.description')) ?></p>
|
||||
</div>
|
||||
<?php if ((int) ($unreadCount ?? 0) > 0): ?>
|
||||
<form method="post" action="/notifications/mark-read">
|
||||
<input type="hidden" name="_token" value="<?= $e((string) ($csrfToken ?? '')) ?>">
|
||||
<button class="btn btn--secondary btn--sm" type="submit"><?= $e($t('notifications.actions.mark_all_read')) ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="notifications-list mt-16">
|
||||
<?php if ($items === []): ?>
|
||||
<div class="muted"><?= $e($t('notifications.empty')) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($items as $notification): ?>
|
||||
<?php
|
||||
$id = (int) ($notification['id'] ?? 0);
|
||||
$targetUrl = trim((string) ($notification['target_url'] ?? ''));
|
||||
$isUnread = trim((string) ($notification['read_at'] ?? '')) === '';
|
||||
?>
|
||||
<article class="notification-row<?= $isUnread ? ' notification-row--unread' : '' ?>">
|
||||
<div class="notification-row__main">
|
||||
<div class="notification-row__title"><?= $e((string) ($notification['title'] ?? '')) ?></div>
|
||||
<div class="notification-row__body"><?= $e((string) ($notification['body'] ?? '')) ?></div>
|
||||
<div class="notification-row__meta"><?= $e((string) ($notification['created_at'] ?? '')) ?></div>
|
||||
</div>
|
||||
<div class="notification-row__actions">
|
||||
<?php if ($targetUrl !== ''): ?>
|
||||
<a class="btn btn--secondary btn--sm" href="<?= $e($targetUrl) ?>"><?= $e($t('notifications.actions.open')) ?></a>
|
||||
<?php endif; ?>
|
||||
<?php if ($isUnread): ?>
|
||||
<form method="post" action="/notifications/mark-read">
|
||||
<input type="hidden" name="_token" value="<?= $e((string) ($csrfToken ?? '')) ?>">
|
||||
<input type="hidden" name="id" value="<?= $e((string) $id) ?>">
|
||||
<button class="btn btn--secondary btn--sm" type="submit"><?= $e($t('notifications.actions.mark_read')) ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($totalPages > 1): ?>
|
||||
<div class="pagination mt-16">
|
||||
<?php if ($page > 1): ?>
|
||||
<a class="btn btn--secondary btn--sm" href="/notifications?page=<?= $page - 1 ?>">←</a>
|
||||
<?php endif; ?>
|
||||
<span class="muted"><?= $e((string) $page) ?>/<?= $e((string) $totalPages) ?></span>
|
||||
<?php if ($page < $totalPages): ?>
|
||||
<a class="btn btn--secondary btn--sm" href="/notifications?page=<?= $page + 1 ?>">→</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
@@ -14,6 +14,9 @@ $invoiceConfigsList = is_array($invoiceConfigs ?? null) ? $invoiceConfigs : [];
|
||||
$invoiceRequestedFlag = (int) ($orderRow['invoice_requested'] ?? 0) === 1;
|
||||
$emailTemplatesList = is_array($emailTemplates ?? null) ? $emailTemplates : [];
|
||||
$emailMailboxesList = is_array($emailMailboxes ?? null) ? $emailMailboxes : [];
|
||||
$smsMessagesList = is_array($smsMessages ?? null) ? $smsMessages : [];
|
||||
$smsPhoneValue = trim((string) ($smsPhone ?? ''));
|
||||
$smsDefaultFooterConfigured = (bool) ($smsDefaultFooterConfigured ?? false);
|
||||
$historyList = is_array($history ?? null) ? $history : [];
|
||||
$activityLogList = is_array($activityLog ?? null) ? $activityLog : [];
|
||||
$statusPanelList = is_array($statusPanel ?? null) ? $statusPanel : [];
|
||||
@@ -181,6 +184,7 @@ foreach ($addressesList as $address) {
|
||||
<button type="button" class="order-details-tab" data-order-tab-target="shipments"><?= $e($t('orders.details.tabs.shipments')) ?> (<?= $e((string) (count($shipmentsList) + count($packagesList))) ?>)</button>
|
||||
<button type="button" class="order-details-tab" data-order-tab-target="payments"><?= $e($t('orders.details.tabs.payments')) ?> (<?= $e((string) count($paymentsList)) ?>)</button>
|
||||
<button type="button" class="order-details-tab" data-order-tab-target="documents"><?= $e($t('orders.details.tabs.documents')) ?> (<?= $e((string) (count($documentsList) + count($receiptsList))) ?>)</button>
|
||||
<button type="button" class="order-details-tab" data-order-tab-target="sms"><?= $e($t('orders.details.tabs.sms')) ?> (<?= $e((string) count($smsMessagesList)) ?>)</button>
|
||||
</section>
|
||||
|
||||
<div class="order-tab-panel is-active" data-order-tab-panel="details">
|
||||
@@ -973,6 +977,62 @@ foreach ($addressesList as $address) {
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="order-tab-panel" data-order-tab-panel="sms">
|
||||
<section class="card mt-16">
|
||||
<div class="order-sms-head">
|
||||
<h3 class="section-title"><?= $e($t('orders.details.sms.title')) ?></h3>
|
||||
<?php if ($smsPhoneValue !== ''): ?>
|
||||
<span class="badge badge--muted"><?= $e($smsPhoneValue) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="order-sms-thread mt-12">
|
||||
<?php if ($smsMessagesList === []): ?>
|
||||
<div class="muted"><?= $e($t('orders.details.sms.empty')) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($smsMessagesList as $smsMessage): ?>
|
||||
<?php
|
||||
$direction = (string) ($smsMessage['direction'] ?? '');
|
||||
$isOutbound = $direction === 'outbound';
|
||||
$messageId = trim((string) ($smsMessage['message_id'] ?? ''));
|
||||
$status = trim((string) ($smsMessage['status'] ?? ''));
|
||||
?>
|
||||
<article class="order-sms-bubble<?= $isOutbound ? ' order-sms-bubble--outbound' : ' order-sms-bubble--inbound' ?>">
|
||||
<div class="order-sms-bubble__meta">
|
||||
<span><?= $e($isOutbound ? $t('orders.details.sms.outbound') : $t('orders.details.sms.inbound')) ?></span>
|
||||
<span><?= $e((string) ($smsMessage['created_at'] ?? '')) ?></span>
|
||||
</div>
|
||||
<div class="order-sms-bubble__body"><?= nl2br($e((string) ($smsMessage['body'] ?? ''))) ?></div>
|
||||
<?php if ($isOutbound && ($status !== '' || $messageId !== '')): ?>
|
||||
<div class="order-sms-bubble__meta">
|
||||
<?php if ($status !== ''): ?><span><?= $e($status) ?></span><?php endif; ?>
|
||||
<?php if ($messageId !== ''): ?><span>ID: <?= $e($messageId) ?></span><?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<form class="order-sms-form mt-16" method="post" action="/orders/<?= $e((string) ($orderId ?? 0)) ?>/sms/send">
|
||||
<input type="hidden" name="_token" value="<?= $e((string) ($csrfToken ?? '')) ?>">
|
||||
<label class="form-field">
|
||||
<span class="field-label"><?= $e($t('orders.details.sms.phone')) ?></span>
|
||||
<input class="form-control" type="tel" name="phone" inputmode="tel" value="<?= $e($smsPhoneValue) ?>" required>
|
||||
</label>
|
||||
<label class="form-field">
|
||||
<span class="field-label"><?= $e($t('orders.details.sms.message')) ?></span>
|
||||
<textarea class="form-control" name="message" rows="3" maxlength="918" required></textarea>
|
||||
<?php if ($smsDefaultFooterConfigured): ?>
|
||||
<span class="order-sms-footer-note"><?= $e($t('orders.details.sms.footer_note')) ?></span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn--primary"><?= $e($t('orders.details.sms.send')) ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1002,7 +1062,9 @@ foreach ($addressesList as $address) {
|
||||
});
|
||||
});
|
||||
|
||||
var forceTab = <?= json_encode($flashSuccessMsg !== '' && strpos($flashSuccessMsg, 'Przesylka') !== false ? 'shipments' : '') ?>;
|
||||
var queryTab = '';
|
||||
try { queryTab = new URLSearchParams(window.location.search).get('tab') || ''; } catch (e) {}
|
||||
var forceTab = queryTab || <?= json_encode($flashSuccessMsg !== '' && strpos($flashSuccessMsg, 'Przesylka') !== false ? 'shipments' : '') ?>;
|
||||
var savedTab = null;
|
||||
try { savedTab = localStorage.getItem(storageKey); } catch (e) {}
|
||||
setActiveTab(forceTab || savedTab || 'details');
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
$settings = is_array($settings ?? null) ? $settings : [];
|
||||
$authMethod = (string) ($settings['auth_method'] ?? 'token');
|
||||
$sender = trim((string) ($settings['sender'] ?? ''));
|
||||
$senderMode = (string) ($settings['sender_mode'] ?? 'text');
|
||||
$senderPhone = trim((string) ($settings['sender_phone'] ?? ''));
|
||||
$defaultFooter = trim((string) ($settings['default_footer'] ?? ''));
|
||||
$hasApiToken = (bool) ($settings['has_api_token'] ?? false);
|
||||
$hasApiKey = (bool) ($settings['has_api_key'] ?? false);
|
||||
$hasApiPassword = (bool) ($settings['has_api_password'] ?? false);
|
||||
@@ -88,6 +91,33 @@ if (str_starts_with($lastTestMessage, 'messageId:')) {
|
||||
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender')) ?></span>
|
||||
</label>
|
||||
|
||||
<fieldset class="integration-settings-checkboxes">
|
||||
<legend class="field-label"><?= $e($t('settings.smsplanet.fields.sender_mode')) ?></legend>
|
||||
<div class="integration-settings-checkboxes__list">
|
||||
<label class="integration-settings-checkboxes__item">
|
||||
<input type="radio" name="sender_mode" value="text"<?= $senderMode !== 'phone' ? ' checked' : '' ?>>
|
||||
<span><?= $e($t('settings.smsplanet.sender_modes.text')) ?></span>
|
||||
</label>
|
||||
<label class="integration-settings-checkboxes__item">
|
||||
<input type="radio" name="sender_mode" value="phone"<?= $senderMode === 'phone' ? ' checked' : '' ?>>
|
||||
<span><?= $e($t('settings.smsplanet.sender_modes.phone')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender_mode')) ?></span>
|
||||
</fieldset>
|
||||
|
||||
<label class="form-field smsplanet-sender-phone-field">
|
||||
<span class="field-label"><?= $e($t('settings.smsplanet.fields.sender_phone')) ?></span>
|
||||
<input class="form-control" type="tel" name="sender_phone" inputmode="tel" maxlength="32" value="<?= $e($senderPhone) ?>" placeholder="48600111222">
|
||||
<span class="muted"><?= $e($t('settings.smsplanet.hints.sender_phone')) ?></span>
|
||||
</label>
|
||||
|
||||
<label class="form-field smsplanet-default-footer-field">
|
||||
<span class="field-label"><?= $e($t('settings.smsplanet.fields.default_footer')) ?></span>
|
||||
<textarea class="form-control" name="default_footer" rows="3" maxlength="300"><?= $e($defaultFooter) ?></textarea>
|
||||
<span class="muted"><?= $e($t('settings.smsplanet.hints.default_footer')) ?></span>
|
||||
</label>
|
||||
|
||||
<fieldset class="integration-settings-checkboxes">
|
||||
<legend class="field-label"><?= $e($t('settings.smsplanet.fields.options')) ?></legend>
|
||||
<div class="integration-settings-checkboxes__list">
|
||||
@@ -127,6 +157,9 @@ if (str_starts_with($lastTestMessage, 'messageId:')) {
|
||||
<label class="form-field">
|
||||
<span class="field-label"><?= $e($t('settings.smsplanet.fields.test_message')) ?></span>
|
||||
<textarea class="form-control" name="message" rows="4" maxlength="918" required>Test orderPRO SMSPLANET</textarea>
|
||||
<?php if ($defaultFooter !== ''): ?>
|
||||
<span class="muted"><?= $e($t('settings.smsplanet.hints.test_footer')) ?></span>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
|
||||
<div class="form-actions mt-16">
|
||||
|
||||
Reference in New Issue
Block a user