mirror of
https://github.com/itflow-org/itflow
synced 2026-08-16 20:45:12 +00:00
Update badge classes to bg
This commit is contained in:
@@ -148,7 +148,7 @@ if (!empty($_SESSION['backup_master_key_reveal'])) {
|
|||||||
<td><?= $backup['backup_size'] > 0 ? escapeHtml(backupFormatBytes($backup['backup_size'])) : '-' ?></td>
|
<td><?= $backup['backup_size'] > 0 ? escapeHtml(backupFormatBytes($backup['backup_size'])) : '-' ?></td>
|
||||||
<td><?= escapeHtml($backup['backup_source']) ?></td>
|
<td><?= escapeHtml($backup['backup_source']) ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge badge-<?= $badge ?>"><?= escapeHtml($status) ?></span>
|
<span class="badge text-bg-<?= $badge ?>"><?= escapeHtml($status) ?></span>
|
||||||
<?php if (!empty($backup['backup_error'])) { ?>
|
<?php if (!empty($backup['backup_error'])) { ?>
|
||||||
<br><small class="text-danger"><?= escapeHtml($backup['backup_error']) ?></small>
|
<br><small class="text-danger"><?= escapeHtml($backup['backup_error']) ?></small>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -784,7 +784,7 @@ if ($user_config_dashboard_technical_enable == 1) {
|
|||||||
<td><a href="ticket.php?ticket_id=<?= "$ticket_id$has_client" ?>"><?= $ticket_subject ?></a></td>
|
<td><a href="ticket.php?ticket_id=<?= "$ticket_id$has_client" ?>"><?= $ticket_subject ?></a></td>
|
||||||
<td><a href="tickets.php?client_id=<?= $client_id ?>"><strong><?= $client_name ?></strong></a></td>
|
<td><a href="tickets.php?client_id=<?= $client_id ?>"><strong><?= $client_name ?></strong></a></td>
|
||||||
<td><?= $contact_display ?></td>
|
<td><?= $contact_display ?></td>
|
||||||
<td><span class='p-2 badge rounded-pill badge-<?= $ticket_priority_color ?>'><?= $ticket_priority ?></span></td>
|
<td><span class='p-2 badge rounded-pill text-bg-<?= $ticket_priority_color ?>'><?= $ticket_priority ?></span></td>
|
||||||
<td><span class='badge rounded-pill text-light p-2' style="background-color: <?= $ticket_status_color ?>"><?= $ticket_status_name ?></span></td>
|
<td><span class='badge rounded-pill text-light p-2' style="background-color: <?= $ticket_status_color ?>"><?= $ticket_status_name ?></span></td>
|
||||||
<td><?= $ticket_updated_at_display ?></td>
|
<td><?= $ticket_updated_at_display ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ if (isset($_GET['invoice_id'])) {
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3 class="text-end"><strong>INVOICE</strong></h3>
|
<h3 class="text-end"><strong>INVOICE</strong></h3>
|
||||||
<h5 class="badge badge-<?= $invoice_badge_color ?> p-2 float-end">
|
<h5 class="badge text-bg-<?= $invoice_badge_color ?> p-2 float-end">
|
||||||
<?= "$invoice_status" ?>
|
<?= "$invoice_status" ?>
|
||||||
</h5>
|
</h5>
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
|
|||||||
@@ -396,12 +396,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php if ($invoice_status == 'Paid' || $invoice_status == 'Partial') { ?>
|
<?php if ($invoice_status == 'Paid' || $invoice_status == 'Partial') { ?>
|
||||||
<a class="ajax-modal" href="#" title="View payments"
|
<a class="ajax-modal" href="#" title="View payments"
|
||||||
data-modal-url="modals/invoice/invoice_payments.php?invoice_id=<?= $invoice_id ?>">
|
data-modal-url="modals/invoice/invoice_payments.php?invoice_id=<?= $invoice_id ?>">
|
||||||
<span class="p-2 badge badge-<?= $invoice_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $invoice_badge_color ?>">
|
||||||
<?= $invoice_status ?>
|
<?= $invoice_status ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<span class="p-2 badge badge-<?= $invoice_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $invoice_badge_color ?>">
|
||||||
<?= $invoice_status ?>
|
<?= $invoice_status ?>
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ ob_start();
|
|||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white">
|
<h5 class="modal-title text-white">
|
||||||
<i class="fa fa-fw fa-credit-card me-2"></i>Payments for <?= "$invoice_prefix$invoice_number" ?>
|
<i class="fa fa-fw fa-credit-card me-2"></i>Payments for <?= "$invoice_prefix$invoice_number" ?>
|
||||||
<span class="p-2 ms-2 badge badge-<?= $invoice_badge_color ?>"><?= $invoice_status ?></span>
|
<span class="p-2 ms-2 badge text-bg-<?= $invoice_badge_color ?>"><?= $invoice_status ?></span>
|
||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -820,7 +820,7 @@ if (isset($_GET['export_quote_pdf'])) {
|
|||||||
|
|
||||||
//Set Badge color based off of quote status
|
//Set Badge color based off of quote status
|
||||||
if ($quote_status == "Sent") {
|
if ($quote_status == "Sent") {
|
||||||
$quote_badge_color = "warning text-white";
|
$quote_badge_color = "warning";
|
||||||
} elseif ($quote_status == "Viewed") {
|
} elseif ($quote_status == "Viewed") {
|
||||||
$quote_badge_color = "primary";
|
$quote_badge_color = "primary";
|
||||||
} elseif ($quote_status == "Accepted") {
|
} elseif ($quote_status == "Accepted") {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ if (isset($_GET['quote_id'])) {
|
|||||||
|
|
||||||
//Set Badge color based off of quote status
|
//Set Badge color based off of quote status
|
||||||
if ($quote_status == "Sent") {
|
if ($quote_status == "Sent") {
|
||||||
$quote_badge_color = "warning text-white";
|
$quote_badge_color = "warning";
|
||||||
} elseif ($quote_status == "Viewed") {
|
} elseif ($quote_status == "Viewed") {
|
||||||
$quote_badge_color = "primary";
|
$quote_badge_color = "primary";
|
||||||
} elseif ($quote_status == "Accepted") {
|
} elseif ($quote_status == "Accepted") {
|
||||||
@@ -259,7 +259,7 @@ if (isset($_GET['quote_id'])) {
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3 class="text-end"><strong>QUOTE</strong></h3>
|
<h3 class="text-end"><strong>QUOTE</strong></h3>
|
||||||
<h5 class="badge badge-<?= $quote_badge_color ?> p-2 float-end">
|
<h5 class="badge text-bg-<?= $quote_badge_color ?> p-2 float-end">
|
||||||
<?= "$quote_status" ?>
|
<?= "$quote_status" ?>
|
||||||
</h5>
|
</h5>
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($quote_status == "Sent") {
|
if ($quote_status == "Sent") {
|
||||||
$quote_badge_color = "warning text-white";
|
$quote_badge_color = "warning";
|
||||||
} elseif ($quote_status == "Viewed") {
|
} elseif ($quote_status == "Viewed") {
|
||||||
$quote_badge_color = "primary";
|
$quote_badge_color = "primary";
|
||||||
} elseif ($quote_status == "Accepted") {
|
} elseif ($quote_status == "Accepted") {
|
||||||
@@ -203,7 +203,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<td><?= $quote_expire ?></td>
|
<td><?= $quote_expire ?></td>
|
||||||
<td><?= $category_name ?></td>
|
<td><?= $category_name ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="p-2 badge badge-<?= $quote_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $quote_badge_color ?>">
|
||||||
<?= $quote_status ?>
|
<?= $quote_status ?>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ if (isset($_GET['recurring_invoice_id'])) {
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3 class="text-end"><strong>RECURRING INVOICE</strong></h3>
|
<h3 class="text-end"><strong>RECURRING INVOICE</strong></h3>
|
||||||
<h5 class="badge badge-<?= $status_badge_color ?> p-2 float-end">
|
<h5 class="badge text-bg-<?= $status_badge_color ?> p-2 float-end">
|
||||||
<?= $status ?>
|
<?= $status ?>
|
||||||
</h5>
|
</h5>
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="p-2 badge badge-<?= $status_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $status_badge_color ?>">
|
||||||
<?= $status ?>
|
<?= $status ?>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
@@ -573,7 +573,7 @@ if (isset($_GET['ticket_id'])) {
|
|||||||
data-modal-url="modals/ticket/ticket_priority.php?id=<?= $ticket_id ?>"
|
data-modal-url="modals/ticket/ticket_priority.php?id=<?= $ticket_id ?>"
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
>
|
>
|
||||||
<span class="badge rounded-pill badge-<?= $ticket_priority_color ?> p-2"><?= $ticket_priority ?></span>
|
<span class="badge rounded-pill text-bg-<?= $ticket_priority_color ?> p-2"><?= $ticket_priority ?></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ $kanban = array_values($statuses);
|
|||||||
<?= escapeHtml($item['ticket_prefix']) . intval($item['ticket_number']) ?>
|
<?= escapeHtml($item['ticket_prefix']) . intval($item['ticket_number']) ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<span class="badge badge-<?= $ticket_priority_color ?>"><?= $item_priority ?></span>
|
<span class="badge text-bg-<?= $ticket_priority_color ?>"><?= $item_priority ?></span>
|
||||||
|
|
||||||
<?php if ($ticket_sla_alert_stage == 2) { ?>
|
<?php if ($ticket_sla_alert_stage == 2) { ?>
|
||||||
<span class="badge bg-danger" title="SLA breached"><i class="fas fa-fw fa-stopwatch"></i></span>
|
<span class="badge bg-danger" title="SLA breached"><i class="fas fa-fw fa-stopwatch"></i></span>
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ if ($tickets) {
|
|||||||
data-modal-url="modals/ticket/ticket_priority.php?id=<?= $ticket_id ?>"
|
data-modal-url="modals/ticket/ticket_priority.php?id=<?= $ticket_id ?>"
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
>
|
>
|
||||||
<span class="p-2 badge rounded-pill badge-<?= $ticket_priority_color ?>"><?= $ticket_priority ?></span>
|
<span class="p-2 badge rounded-pill text-bg-<?= $ticket_priority_color ?>"><?= $ticket_priority ?></span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ if ($account_filter) {
|
|||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="badge badge-<?= $transaction_badge_color ?>"><?= $transaction_type ?></span></td>
|
<td><span class="badge text-bg-<?= $transaction_badge_color ?>"><?= $transaction_type ?></span></td>
|
||||||
<td>
|
<td>
|
||||||
<?= $transaction_category_display ?>
|
<?= $transaction_category_display ?>
|
||||||
<div class="text-secondary"><small><?= truncate($transaction_description, 60) ?></small></div>
|
<div class="text-secondary"><small><?= truncate($transaction_description, 60) ?></small></div>
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ header("X-Frame-Options: DENY"); // Legacy
|
|||||||
$_SESSION['alert_type'] = "info";
|
$_SESSION['alert_type'] = "info";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-<?= $_SESSION['alert_type'] ?>" id="alert">
|
<div class="alert alert-<?= alertStyleClass($_SESSION['alert_type'] ?? 'success') ?> alert-dismissible" id="alert">
|
||||||
<?= alertMessageHtml($_SESSION['alert_message']) ?>
|
<?= alertMessageHtml($_SESSION['alert_message']) ?>
|
||||||
<button class='close' data-bs-dismiss='alert'>×</button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ $invoices_sql = mysqli_query($mysqli, "SELECT invoice_amount, invoice_date, invo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($invoice_status == "Sent") {
|
if ($invoice_status == "Sent") {
|
||||||
$invoice_badge_color = "warning text-white";
|
$invoice_badge_color = "warning";
|
||||||
} elseif ($invoice_status == "Viewed") {
|
} elseif ($invoice_status == "Viewed") {
|
||||||
$invoice_badge_color = "info";
|
$invoice_badge_color = "info";
|
||||||
} elseif ($invoice_status == "Partial") {
|
} elseif ($invoice_status == "Partial") {
|
||||||
@@ -80,7 +80,7 @@ $invoices_sql = mysqli_query($mysqli, "SELECT invoice_amount, invoice_date, invo
|
|||||||
<td><?= $invoice_date ?></td>
|
<td><?= $invoice_date ?></td>
|
||||||
<td class="<?= $overdue_color ?>"><?= $invoice_due ?></td>
|
<td class="<?= $overdue_color ?>"><?= $invoice_due ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="p-2 badge badge-<?= $invoice_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $invoice_badge_color ?>">
|
||||||
<?= $invoice_status ?>
|
<?= $invoice_status ?>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ $quotes_sql = mysqli_query($mysqli, "SELECT quote_amount, quote_date, quote_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($quote_status == "Sent") {
|
if ($quote_status == "Sent") {
|
||||||
$quote_badge_color = "warning text-white";
|
$quote_badge_color = "warning";
|
||||||
} elseif ($quote_status == "Viewed") {
|
} elseif ($quote_status == "Viewed") {
|
||||||
$quote_badge_color = "primary";
|
$quote_badge_color = "primary";
|
||||||
} elseif ($quote_status == "Accepted") {
|
} elseif ($quote_status == "Accepted") {
|
||||||
@@ -70,7 +70,7 @@ $quotes_sql = mysqli_query($mysqli, "SELECT quote_amount, quote_date, quote_id,
|
|||||||
<td><?= numfmt_format_currency($currency_format, $quote_amount, $session_company_currency) ?></td>
|
<td><?= numfmt_format_currency($currency_format, $quote_amount, $session_company_currency) ?></td>
|
||||||
<td><?= $quote_date ?></td>
|
<td><?= $quote_date ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="p-2 badge badge-<?= $quote_badge_color ?>">
|
<span class="p-2 badge text-bg-<?= $quote_badge_color ?>">
|
||||||
<?= $quote_status ?>
|
<?= $quote_status ?>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ $balance = $invoice_amounts - $amount_paid;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($invoice_status == "Sent") {
|
if ($invoice_status == "Sent") {
|
||||||
$invoice_badge_color = "warning text-white";
|
$invoice_badge_color = "warning";
|
||||||
} elseif ($invoice_status == "Viewed") {
|
} elseif ($invoice_status == "Viewed") {
|
||||||
$invoice_badge_color = "info";
|
$invoice_badge_color = "info";
|
||||||
} elseif ($invoice_status == "Partial") {
|
} elseif ($invoice_status == "Partial") {
|
||||||
|
|||||||
@@ -594,3 +594,25 @@ a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-li
|
|||||||
.theme-teal .nav-pills {
|
.theme-teal .nav-pills {
|
||||||
--bs-nav-pills-link-active-color: #000;
|
--bs-nav-pills-link-active-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --- Theme swatch colours -----------------------------------------------
|
||||||
|
admin/settings_theme.php renders each choice as <i class="fa-circle
|
||||||
|
text-<colour>">. AdminLTE 3 defined those; v4 does not, so every swatch
|
||||||
|
on the theme picker rendered with no colour at all - you could not see
|
||||||
|
what you were selecting. Same accent hexes the themes themselves use. */
|
||||||
|
.text-black { color: #000000 !important; }
|
||||||
|
.text-blue { color: #007bff !important; }
|
||||||
|
.text-cyan { color: #17a2b8 !important; }
|
||||||
|
.text-fuchsia { color: #f012be !important; }
|
||||||
|
.text-gray { color: #6c757d !important; }
|
||||||
|
.text-green { color: #28a745 !important; }
|
||||||
|
.text-indigo { color: #6610f2 !important; }
|
||||||
|
.text-lightblue { color: #3c8dbc !important; }
|
||||||
|
.text-maroon { color: #d81b60 !important; }
|
||||||
|
.text-navy { color: #001f3f !important; }
|
||||||
|
.text-olive { color: #3d9970 !important; }
|
||||||
|
.text-orange { color: #fd7e14 !important; }
|
||||||
|
.text-pink { color: #e83e8c !important; }
|
||||||
|
.text-purple { color: #6f42c1 !important; }
|
||||||
|
.text-red { color: #dc3545 !important; }
|
||||||
|
.text-teal { color: #20c997 !important; }
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function getAssetIcon($asset_type) {
|
|||||||
|
|
||||||
function getInvoiceBadgeColor($invoice_status) {
|
function getInvoiceBadgeColor($invoice_status) {
|
||||||
if ($invoice_status == "Sent") {
|
if ($invoice_status == "Sent") {
|
||||||
$invoice_badge_color = "warning text-white";
|
$invoice_badge_color = "warning";
|
||||||
} elseif ($invoice_status == "Viewed") {
|
} elseif ($invoice_status == "Viewed") {
|
||||||
$invoice_badge_color = "info";
|
$invoice_badge_color = "info";
|
||||||
} elseif ($invoice_status == "Partial") {
|
} elseif ($invoice_status == "Partial") {
|
||||||
|
|||||||
@@ -169,6 +169,28 @@ function escapeCsvFormula($value) {
|
|||||||
* existed there were four separate implementations and one of them interpolated
|
* existed there were four separate implementations and one of them interpolated
|
||||||
* raw.
|
* raw.
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Map a flashAlert type onto a real Bootstrap contextual class.
|
||||||
|
*
|
||||||
|
* flashAlert() is called with more type names than Bootstrap has classes -
|
||||||
|
* 'error', 'alert' and a typo'd 'errpr' among them - so interpolating the raw
|
||||||
|
* value produced alert-error / alert-alert, which style nothing at all.
|
||||||
|
*/
|
||||||
|
function alertStyleClass($type) {
|
||||||
|
|
||||||
|
$alert_classes = [
|
||||||
|
'success' => 'success',
|
||||||
|
'info' => 'info',
|
||||||
|
'warning' => 'warning',
|
||||||
|
'alert' => 'warning',
|
||||||
|
'error' => 'danger',
|
||||||
|
'errpr' => 'danger',
|
||||||
|
'danger' => 'danger',
|
||||||
|
];
|
||||||
|
|
||||||
|
return $alert_classes[$type] ?? 'secondary';
|
||||||
|
}
|
||||||
|
|
||||||
function alertMessageHtml($message) {
|
function alertMessageHtml($message) {
|
||||||
|
|
||||||
$allowed_tags = [
|
$allowed_tags = [
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ if ($balance > 0) {
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3 class="text-end"><strong>INVOICE</strong></h3>
|
<h3 class="text-end"><strong>INVOICE</strong></h3>
|
||||||
<h5 class="badge badge-<?= $invoice_badge_color ?> p-2 float-end">
|
<h5 class="badge text-bg-<?= $invoice_badge_color ?> p-2 float-end">
|
||||||
<?= "$invoice_status" ?>
|
<?= "$invoice_status" ?>
|
||||||
</h5>
|
</h5>
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ $currency_format = numfmt_create($company_locale, NumberFormatter::CURRENCY);
|
|||||||
|
|
||||||
//Set Badge color based off of quote status
|
//Set Badge color based off of quote status
|
||||||
if ($quote_status == "Sent") {
|
if ($quote_status == "Sent") {
|
||||||
$quote_badge_color = "warning text-white";
|
$quote_badge_color = "warning";
|
||||||
} elseif ($quote_status == "Viewed") {
|
} elseif ($quote_status == "Viewed") {
|
||||||
$quote_badge_color = "primary";
|
$quote_badge_color = "primary";
|
||||||
} elseif ($quote_status == "Accepted") {
|
} elseif ($quote_status == "Accepted") {
|
||||||
@@ -150,7 +150,7 @@ if ($quote_status == "Draft" || $quote_status == "Sent" || $quote_status == "Vie
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h3 class="text-end"><strong>QUOTE</strong></h3>
|
<h3 class="text-end"><strong>QUOTE</strong></h3>
|
||||||
<h5 class="badge badge-<?= $quote_badge_color ?> p-2 float-end">
|
<h5 class="badge text-bg-<?= $quote_badge_color ?> p-2 float-end">
|
||||||
<?= "$quote_status" ?>
|
<?= "$quote_status" ?>
|
||||||
</h5>
|
</h5>
|
||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
|
|||||||
@@ -20,21 +20,13 @@ if (!empty($_SESSION['alert_message'])) {
|
|||||||
|
|
||||||
$alert_type = $_SESSION['alert_type'] ?? 'success';
|
$alert_type = $_SESSION['alert_type'] ?? 'success';
|
||||||
|
|
||||||
// flashAlert() is called with more type names than toastr ever defined -
|
// One mapping for both renderers - see alertStyleClass() in
|
||||||
// 'danger' (19 sites), 'alert' (4) and a typo'd 'errpr' (1) all resolved to
|
// functions/sanitize.php. flashAlert() is called with more type names than
|
||||||
// an undefined toastr method, threw, and showed the user nothing at all.
|
// Bootstrap has classes ('danger', 'alert' and a typo'd 'errpr' among
|
||||||
// Everything maps onto a real style here; anything unrecognised still shows.
|
// them), and an unmapped value used to resolve to nothing at all.
|
||||||
$alert_styles = [
|
$alert_style = 'text-bg-' . alertStyleClass($alert_type);
|
||||||
'success' => 'text-bg-success',
|
// text-bg-info and text-bg-warning are the two Bootstrap pairs with dark text
|
||||||
'info' => 'text-bg-info',
|
$alert_dark_text = in_array(alertStyleClass($alert_type), ['warning', 'info'], true);
|
||||||
'warning' => 'text-bg-warning',
|
|
||||||
'alert' => 'text-bg-warning',
|
|
||||||
'error' => 'text-bg-danger',
|
|
||||||
'errpr' => 'text-bg-danger',
|
|
||||||
'danger' => 'text-bg-danger',
|
|
||||||
];
|
|
||||||
$alert_style = $alert_styles[$alert_type] ?? 'text-bg-secondary';
|
|
||||||
$alert_dark_text = in_array($alert_type, ['warning', 'alert', 'info'], true);
|
|
||||||
|
|
||||||
// Escaping lives in one place now - see alertMessageHtml() in functions/sanitize.php
|
// Escaping lives in one place now - see alertMessageHtml() in functions/sanitize.php
|
||||||
$alert_safe_message = alertMessageHtml($_SESSION['alert_message']);
|
$alert_safe_message = alertMessageHtml($_SESSION['alert_message']);
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ if (isset($_POST['add_telemetry'])) {
|
|||||||
?>
|
?>
|
||||||
<div class="alert alert-info" id="alert">
|
<div class="alert alert-info" id="alert">
|
||||||
<?= alertMessageHtml($_SESSION['alert_message']) ?>
|
<?= alertMessageHtml($_SESSION['alert_message']) ?>
|
||||||
<button class='close' data-bs-dismiss='alert'>×</button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$_SESSION['alert_type'] = '';
|
$_SESSION['alert_type'] = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user