QoL 48: empty first choices read Select a client where you pick one, Any client where a list is filtered and None or No contact where it can be blank, the same for multi-pick placeholders, the report client and agent pickers and the choices built in script

This commit is contained in:
johnnyq
2026-11-21 00:47:49 -05:00
parent e48ee1ca0a
commit 91af76b2e1
156 changed files with 266 additions and 265 deletions

View File

@@ -220,6 +220,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
- Dates: every date reads one way - Nov 13, 2026, with times as 2:30 PM and the day of the week as Fri, Nov 13 where it shows. The invoice, quote, recurring invoice, expense, income, trip and transaction lists and pages, an asset's and a license's dates, certificates, domains, invoice and quote PDFs, statements and the guest invoice and quote pages showed 2026-11-13; some times read 2:30pm or 14:30, and some emails put the day first, 13 Nov. Pointing at a "3 days ago" shows the date and time the same way. Date fields, exports and file names keep 2026-11-13.
- Windows and buttons: a window that makes something new is called New ... and its button says Create, and an edit window is called Edit ..., with the record's name after it in lighter text, and its button says Save - the titles read Editing contact:, Tag:, Creating note: and so on, and the buttons said Add, Add Income, Add Expense, Log Trip, Set Up, Make Draft, Create Client, Save changes and the like. On list pages the button that opens it says New, as New Provider, New Model, New Instance and New Item had said Add. A window that adds to the record it's on - Add Tickets on an invoice, Add keys on a license - still says Add. Field labels sit the same distance above their fields in every window, the extensions on a new client, applying a project template and adding ticket templates to one have their icon in front like every other field, invoices have one icon everywhere, and deleting a client is a normal window with Delete at the bottom, turned on once the client's name is typed.
- Menus, icons and questions: every More menu has the same ⋮ button, and Delete, Restore and Export each have one icon everywhere. The required-field star sits the same way on every form, and Incident response has the usual dark window with its warning in red. A question before an action names it on its button - Delete, Remove, Archive - rather than Yes. Resetting a ticket's timer, removing an approval request, redacting with nothing selected and a window that fails to open now use ITFlow's own question and message rather than the browser's. Every list's search box reads Search ..., with what it looks in shown when you point at it.
- Dropdowns: the empty first choice reads the same way everywhere - - Select a client -, - Select an account - and so on where you pick one, - Any client -, - Any status - where a list is filtered, and - None -, - No contact -, - Nobody - where it can be left blank. They had said - Select Client -, - Pick a role -, - Which account -, - How it was paid -, - All Clients -, Not Assigned and the like.
### Bug Fixes

View File

@@ -73,7 +73,7 @@ ob_start();
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-robot"></i></span>
<select class="form-select select2" name="provider" id="aiModelProvider" data-ai-model-provider>
<option value="">- Pick a provider -</option>
<option value="">- Select a provider -</option>
<?php foreach ($providers as $id => $provider) { ?>
<option value="<?= $id ?>" <?= $id === $provider_id ? 'selected' : '' ?><?= selectOptionData(['icon' => aiProviderIcon($provider['ai_provider_kind']), 'description' => aiProviderKind($provider['ai_provider_kind'])['name'], 'example' => aiProviderKind($provider['ai_provider_kind'])['example']]) ?>><?= escapeHtml($provider['ai_provider_name']) ?></option>
<?php } ?>

View File

@@ -48,7 +48,7 @@ $c_max = $c_config['max'] ?? 200;
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select select2" name="type" required>
<option value="">- What it sorts -</option>
<option value="">- Select a type -</option>
<?php foreach (categoryKinds() as $kind_key => $kind_config) { ?>
<option value="<?= escapeHtml($kind_key) ?>"><?= escapeHtml(ucfirst($kind_config['many'])) ?></option>
<?php } ?>

View File

@@ -54,7 +54,7 @@ if (!$template) { ?>
<label class="form-label">Client tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Pick client tags -">
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Select client tags -">
<?php foreach (tagOptionsFor('client', $tag_ids) as $tag) { ?>
<?= tagOptionHtml($tag, $tag_ids) ?>
<?php } ?>

View File

@@ -39,7 +39,7 @@ if (!$template || $template['document_template_archived_at']) { ?>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required data-doc-template-client>
<option value="">- Pick a client -</option>
<option value="">- Select a client -</option>
<?php
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL" . clientNotLeadSql($picked_client_id) . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients)) { ?>

View File

@@ -46,7 +46,7 @@ if (!$template || $template['document_template_archived_at']) { ?>
<label class="form-label">Clients <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select select2" name="client_ids[]" multiple required data-placeholder="- Pick clients -">
<select class="form-select select2" name="client_ids[]" multiple required data-placeholder="- Select clients -">
<?php
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_lead FROM clients WHERE client_archived_at IS NULL" . clientNotLeadSql($picked) . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients)) { ?>

View File

@@ -74,7 +74,7 @@ if (!officesReady()) { ?>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-globe-americas"></i></span>
<select class="form-select select2" name="office_country">
<option value="">- Country -</option>
<option value="">- Select a country -</option>
<?php foreach ($localization['countries'] as $country_name) { ?>
<option value="<?= escapeHtml($country_name) ?>" data-iso2="<?= escapeHtml($localization['country_iso2'][$country_name] ?? '') ?>" <?= $country_name === $office_country ? 'selected' : '' ?>><?= escapeHtml($country_name) ?></option>
<?php } ?>

View File

@@ -44,7 +44,7 @@ if (!$payment_method) { ?>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-random"></i></span>
<select class="form-select select2" name="move_to" required>
<option value="">- Pick a method -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($others as $other_id => $other) { ?>
<option value="<?= intval($other_id) ?>"><?= escapeHtml($other['payment_method_name']) ?><?= empty($other['payment_method_archived_at']) ? '' : ' (archived)' ?></option>
<?php } ?>

View File

@@ -148,7 +148,7 @@ ob_start();
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-piggy-bank"></i></span>
<select class="form-select select2" name="account" id="paymentProviderAccount">
<option value="">- Pick an account -</option>
<option value="">- Select an account -</option>
<?php while ($account = mysqli_fetch_assoc($accounts)) { ?>
<option value="<?= intval($account['account_id']) ?>" <?= intval($account['account_id']) === $account_id ? 'selected' : '' ?>><?= escapeHtml($account['account_name']) ?><?= $account['account_archived_at'] ? ' (archived)' : '' ?></option>
<?php } ?>
@@ -186,7 +186,7 @@ ob_start();
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
<select class="form-select select2" name="expense_vendor" id="paymentProviderVendor">
<option value="">- Pick a vendor -</option>
<option value="">- Select a vendor -</option>
<?php while ($vendor = mysqli_fetch_assoc($vendors)) { ?>
<option value="<?= intval($vendor['vendor_id']) ?>" <?= intval($vendor['vendor_id']) === $vendor_id ? 'selected' : '' ?>><?= escapeHtml($vendor['vendor_name']) ?><?= $vendor['vendor_archived_at'] ? ' (archived)' : '' ?></option>
<?php } ?>
@@ -201,7 +201,7 @@ ob_start();
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
<select class="form-select select2" name="expense_category" id="paymentProviderCategory">
<option value="">- Pick a category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Expense', $category_id ?: null) ?>
</select>
<?= categoryAddButtonHtml('Expense') ?>

View File

@@ -38,7 +38,7 @@ ob_start();
<label class="form-label">Ticket templates <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-life-ring"></i></span>
<select class="form-select select2" name="ticket_template_ids[]" multiple required data-placeholder="Pick ticket templates...">
<select class="form-select select2" name="ticket_template_ids[]" multiple required data-placeholder="- Select ticket templates -">
<?php while ($row = mysqli_fetch_assoc($sql)) {
$task_count = intval($row['task_count']); ?>
<option value="<?= intval($row['ticket_template_id']) ?>" data-icon="fas fa-life-ring"

View File

@@ -48,7 +48,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php while ($client = mysqli_fetch_assoc($clients)) {
$client_id = intval($client['client_id']);
$others = $linked_to[$client_id] ?? []; ?>

View File

@@ -141,7 +141,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select select2" name="alert_category_id" id="rmmProviderAlertCategory">
<option value="0">- Not Categorized -</option>
<option value="0">- Not categorized -</option>
<?= categoryOptionsHtml('Ticket', $alert_category_id ?: null) ?>
</select>
<?= categoryAddButtonHtml('Ticket') ?>

View File

@@ -70,7 +70,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select select2" name="type" required>
<option value="">- Pick a type -</option>
<option value="">- Select a type -</option>
<?= categoryOptionsHtml('software_type', $type) ?>
</select>
<?= categoryAddButtonHtml('software_type', 'btn btn-outline-secondary') ?>

View File

@@ -53,7 +53,7 @@ if (!$template) { ?>
<label class="form-label">Client tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Pick client tags -">
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Select client tags -">
<?php foreach (tagOptionsFor('client', $tag_ids) as $tag) { ?>
<?= tagOptionHtml($tag, $tag_ids) ?>
<?php } ?>

View File

@@ -43,7 +43,7 @@ if (!$template || $template['software_template_archived_at']) { ?>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Pick a client -</option>
<option value="">- Select a client -</option>
<?php
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL" . clientNotLeadSql($picked_client_id) . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients)) { ?>

View File

@@ -57,7 +57,7 @@ if (!$template || $template['software_template_archived_at']) { ?>
<label class="form-label">Clients <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select select2" name="client_ids[]" multiple required data-placeholder="- Pick clients -">
<select class="form-select select2" name="client_ids[]" multiple required data-placeholder="- Select clients -">
<?php
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL" . clientNotLeadSql($picked) . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients)) {

View File

@@ -227,7 +227,7 @@ $portal_client_ids = !empty($t['ticket_template_id']) ? ticketTemplatePortalClie
<label class="form-label">The clients</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select select2" name="portal_clients[]" multiple data-placeholder="Pick the clients that see it">
<select class="form-select select2" name="portal_clients[]" multiple data-placeholder="- Select the clients that see it -">
<?php
$sql_portal_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE (client_archived_at IS NULL AND client_lead = 0) OR client_id IN (" . ($portal_client_ids ? implode(',', $portal_client_ids) : '0') . ") ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_portal_clients)) { ?>

View File

@@ -27,7 +27,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-shield"></i></span>
<select class="form-select select2" name="role" required>
<option value="">- Pick a role -</option>
<option value="">- Select a role -</option>
<?php foreach ($roles as $role_id => $role) { ?>
<option value="<?= $role_id ?>"<?= selectOptionRole($role) ?>><?= escapeHtml($role['role_name']) ?></option>
<?php } ?>

View File

@@ -92,7 +92,7 @@ $value = function ($key) use ($form) {
<span class="input-group-text"><i class="fas fa-fw fa-user-shield"></i></span>
<select class="form-select select2" name="role" required data-user-role>
<?php if (!isset($form_roles[$form_role_id])) { ?>
<option value="">- Pick a role -</option>
<option value="">- Select a role -</option>
<?php } ?>
<?php foreach ($form_roles as $role_id => $role) { ?>
<option value="<?= $role_id ?>" <?= $form_role_id === $role_id ? 'selected' : '' ?> data-role-admin="<?= intval($role['role_is_admin']) ?>"<?= selectOptionRole($role) ?>><?= escapeHtml($role['role_name']) ?><?= $role['role_archived_at'] ? ' (archived)' : '' ?></option>

View File

@@ -47,7 +47,7 @@ ob_start();
<span class="input-group-text"><i class="fas fa-fw fa-user-shield"></i></span>
<select class="form-select select2" name="role" required>
<?php if (!isset($roles[$role_id])) { ?>
<option value="">- Pick a role -</option>
<option value="">- Select a role -</option>
<?php } ?>
<?php foreach ($roles as $id => $role) {
if ($role['role_archived_at']) {

View File

@@ -60,7 +60,7 @@ ob_start();
<span class="input-group-text"><i class="fas fa-fw fa-user-shield"></i></span>
<select class="form-select select2" name="role" required>
<?php if (!isset($roles[$role_id])) { ?>
<option value="">- Pick a role -</option>
<option value="">- Select a role -</option>
<?php } ?>
<?php foreach ($roles as $id => $role) { ?>
<option value="<?= $id ?>" <?= $id === $role_id ? 'selected' : '' ?><?= selectOptionRole($role) ?>><?= escapeHtml($role['role_name']) ?><?= $role['role_archived_at'] ? ' (archived)' : '' ?></option>

View File

@@ -53,7 +53,7 @@ if (!$template) { ?>
<label class="form-label">Client tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Pick client tags -">
<select class="form-select select2" name="tags[]" multiple data-placeholder="- Select client tags -">
<?php foreach (tagOptionsFor('client', $tag_ids) as $tag) { ?>
<?= tagOptionHtml($tag, $tag_ids) ?>
<?php } ?>

View File

@@ -115,7 +115,7 @@ $page_title = 'Saved Cards';
<?php if ($provider_count > 1 || $provider_filter) { ?>
<div class="col-md-3 col-lg-2">
<select class="form-select" name="provider" onchange="this.form.submit()" aria-label="Provider">
<option value="">All providers</option>
<option value="">- Any provider -</option>
<?php while ($provider = mysqli_fetch_assoc($providers)) { ?>
<option value="<?= intval($provider['payment_provider_id']) ?>" <?= intval($provider['payment_provider_id']) === $provider_filter ? 'selected' : '' ?>><?= escapeHtml($provider['payment_provider_name']) ?></option>
<?php } ?>
@@ -124,7 +124,7 @@ $page_title = 'Saved Cards';
<?php } ?>
<div class="col-md-3 col-lg-3">
<select class="form-select select2" name="client" onchange="this.form.submit()" aria-label="Client">
<option value="">All clients</option>
<option value="">- Any client -</option>
<?php while ($client = mysqli_fetch_assoc($clients)) { ?>
<option value="<?= intval($client['client_id']) ?>" <?= intval($client['client_id']) === $client_filter ? 'selected' : '' ?>><?= escapeHtml($client['client_name']) ?></option>
<?php } ?>

View File

@@ -91,7 +91,7 @@ echo settingsPageStart('ticket');
<?= settingsSelect('config_quick_ticket_priority', $quick['priority'], ['Low' => 'Low', 'Medium' => 'Medium', 'High' => 'High', 'Urgent' => 'Urgent'], ['icon' => 'fa-thermometer-half',
'help' => 'The window can change it for one ticket. Its SLA follows the priority, as any ticket\'s does.']) ?>
<?= settingsSelect('config_quick_ticket_category', $quick['category'], [], ['icon' => 'fa-layer-group', 'search' => true,
'options_html' => '<option value="0"' . ($quick['category'] ? '' : ' selected') . '>- Not Categorized -</option>' . categoryOptionsHtml('Ticket', $quick['category'] ?: null)]) ?>
'options_html' => '<option value="0"' . ($quick['category'] ? '' : ' selected') . '>- Not categorized -</option>' . categoryOptionsHtml('Ticket', $quick['category'] ?: null)]) ?>
<?php if ($config_module_enable_accounting) { ?>
<?= settingsSelect('config_quick_ticket_billable', $quick['billable'], QUICK_TICKET_BILLABLE, ['icon' => 'fa-dollar-sign']) ?>
<?php } ?>

View File

@@ -503,7 +503,7 @@ $pill_url = function ($view) use ($on_days) {
<div class="input-group mb-2">
<span class="input-group-text" style="width: 7rem;"><i class="fa fa-fw fa-flag me-2 text-<?= $flag_tone ?>"></i><?= $priority ?></span>
<select class="form-select select2" name="global_sla_<?= strtolower($priority) ?>" aria-label="Default SLA for <?= $priority ?> tickets" data-sla-default="<?= $priority ?>">
<option value="0">No SLA</option>
<option value="0">- No SLA -</option>
<?php foreach ($sla_choices as $choice_id => $choice) { ?>
<option value="<?= $choice_id ?>"<?= $selected_sla_id === $choice_id ? ' selected' : '' ?><?= selectOptionData(['description' => $choice['sla_archived_at'] ? 'Archived - tickets get none' : $targets_text($choice)]) ?>><?= escapeHtml($choice['sla_name']) ?><?= $choice['sla_archived_at'] ? ' (archived)' : '' ?></option>
<?php } ?>

View File

@@ -206,7 +206,7 @@ $sort_link = function ($column, $label) use ($url_query_strings_sort, $sort, $di
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-star"></i></span>
<select class="form-select" name="default_tax_id">
<option value="0">No default</option>
<option value="0">- No default -</option>
<?php foreach ($active_taxes as $id => $tax) { ?>
<option value="<?= intval($id) ?>"<?= intval($id) === $tax_settings['default_id'] ? ' selected' : '' ?>><?= escapeHtml(taxLabel($tax)) ?></option>
<?php } ?>

View File

@@ -93,7 +93,7 @@ while ($row = mysqli_fetch_assoc($sql_clients)) {
</div>
<div class="col-lg-2 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()" aria-label="Client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php foreach ($client_options as $row) { ?>
<option value="<?= intval($row['client_id']) ?>" <?= $client_filter === intval($row['client_id']) ? 'selected' : '' ?><?= selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '') ?>><?= escapeHtml($row['client_name']) ?></option>
<?php } ?>

View File

@@ -288,7 +288,7 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
<?php if ($client_url) { ?>
<div class="col-xl col-lg-4 col-md-6">
<select class="form-select select2" name="location" onchange="this.form.submit()">
<option value="">- All Locations -</option>
<option value="">- Any location -</option>
<?php
$sql_locations_filter = mysqli_query($mysqli, "
SELECT DISTINCT location_id, location_name
@@ -308,7 +308,7 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
<?php } else { ?>
<div class="col-xl col-lg-4 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation
@@ -329,7 +329,7 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
<?php } ?>
<div class="col-xl col-lg-4 col-md-6">
<select class="form-select select2" name="status" onchange="this.form.submit()">
<option value="">- Status -</option>
<option value="">- Any status -</option>
<?= categoryFilterOptionsHtml('asset_status', $status_filter, "SELECT DISTINCT asset_status FROM assets
LEFT JOIN clients ON client_id = asset_client_id
WHERE $archive_query AND asset_status IS NOT NULL AND asset_status <> ''
@@ -337,7 +337,7 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
</select>
</div>
<div class="col-xl col-lg-3 col-md-6">
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Tags -" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
// Tags in use on assets in this scope, plus any already picked
$sql_tags_filter = mysqli_query($mysqli, "
@@ -370,7 +370,7 @@ $search_noun = $type_filter ? $asset_type_tabs[$type_filter]['label'] : 'assets'
<?php } ?>
<div class="col-xl col-lg-3 col-md-6">
<select class="form-select select2" name="expire_days" onchange="this.form.submit()">
<option value="" <?php if ($expire_days == "") { echo "selected"; } ?>>- Warranty -</option>
<option value="" <?php if ($expire_days == "") { echo "selected"; } ?>>- Any warranty -</option>
<option value="expired" <?php if ($expire_days === "expired") { echo "selected"; } ?>>Expired</option>
<?php foreach ([7, 30, 45, 60, 90] as $expire_option) { ?>
<option value="<?= $expire_option ?>" <?php if ($expire_days === $expire_option) { echo "selected"; } ?>>Expiring in <?= $expire_option ?> days</option>

View File

@@ -84,7 +84,7 @@ foreach ($sources as $key => $source) {
<label class="form-label small text-body-secondary text-uppercase fw-semibold mb-1" for="calendarAgent">Whose</label>
<select class="form-select select2 mb-3" id="calendarAgent">
<option value="0" data-icon="fas fa-users">Everyone</option>
<option value="0" data-icon="fas fa-users">- Everyone -</option>
<?php foreach ($agents as $agent) { ?>
<option value="<?= intval($agent['user_id']) ?>"<?= selectOptionUser($agent['user_id'], $agent['user_name'], $agent['user_avatar']) ?>><?= escapeHtml($agent['user_name']) ?><?= intval($agent['user_id']) === intval($session_user_id) ? ' (me)' : '' ?></option>
<?php } ?>

View File

@@ -186,7 +186,7 @@ $export_extra = [
<?php if (!$client_url) { ?>
<div class="col-lg-3 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation

View File

@@ -86,7 +86,7 @@ $co_offer_recurring = $co_contract && !$co_contract_recurring && (contractRecurr
</div>
<div class="col-sm-6">
<?= settingsSelect('category', '0', [], ['id' => 'coCategory', 'icon' => 'fa-tag', 'label' => 'Category',
'options_html' => '<option value="0">- Category -</option>' . categoryOptionsHtml('Income', settingsValue('category', '0'))]) ?>
'options_html' => '<option value="0">- Select a category -</option>' . categoryOptionsHtml('Income', settingsValue('category', '0'))]) ?>
</div>
<div class="col-12">
<?= settingsInput('item_name', $co_contract['contract_name'], ['id' => 'coItemName', 'icon' => 'fa-cube', 'label' => 'Line', 'maxlength' => 200]) ?>

View File

@@ -51,7 +51,7 @@ unset($_SESSION['co_kept_tags']);
<label class="form-label" for="coTags">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" id="coTags" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" id="coTags" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('client', $co_tags) ?>
</select>
</div>

View File

@@ -67,7 +67,7 @@ $co_country = (string) settingsValue('country', $session_company_country);
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-globe-americas"></i></span>
<select class="form-select select2" id="coLocCountry" name="country">
<option value="">- Country -</option>
<option value="">- Select a country -</option>
<?php foreach ($countries_array as $co_country_name) { ?>
<option<?= $co_country === $co_country_name ? ' selected' : '' ?> data-iso2="<?= escapeHtml($country_iso2_array[$co_country_name] ?? '') ?>"><?= escapeHtml($co_country_name) ?></option>
<?php } ?>

View File

@@ -448,7 +448,7 @@ $total_leads = intval($row['leads']);
<div class="row g-3">
<div class="col-md-3">
<label class="form-label">Tags</label>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="Any tag" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
$sql_tags_filter = mysqli_query($mysqli, "
SELECT tags.tag_id, tags.tag_name, MAX(tags.tag_color) AS tag_color, MAX(tags.tag_icon) AS tag_icon
@@ -469,7 +469,7 @@ $total_leads = intval($row['leads']);
<div class="col-md-3">
<label class="form-label">Industry</label>
<select class="form-select select2" name="industry" onchange="this.form.submit()">
<option value="">Any industry</option>
<option value="">- Any industry -</option>
<?php
$sql_industries_filter = mysqli_query($mysqli, "SELECT DISTINCT client_type FROM clients WHERE client_$archive_query AND client_type != '' $leads_query ORDER BY client_type ASC");
while ($row = mysqli_fetch_assoc($sql_industries_filter)) {
@@ -481,7 +481,7 @@ $total_leads = intval($row['leads']);
<div class="col-md-3">
<label class="form-label">Referral</label>
<select class="form-select select2" name="referral" onchange="this.form.submit()">
<option value="">Any referral</option>
<option value="">- Any referral -</option>
<?= categoryFilterOptionsHtml('Referral', (string) ($_GET['referral'] ?? ''), "SELECT DISTINCT client_referral FROM clients WHERE client_$archive_query AND client_referral != '' $leads_query") ?>
</select>
</div>
@@ -489,7 +489,7 @@ $total_leads = intval($row['leads']);
<div class="col-md-3">
<label class="form-label">Contract</label>
<select class="form-select select2" name="contract" onchange="this.form.submit()" data-client-contract-filter>
<option value="">Any contract or none</option>
<option value="">- Any contract or none -</option>
<option value="any"<?= $contract_filter === 'any' ? ' selected' : '' ?>>One in force</option>
<option value="none"<?= $contract_filter === 'none' ? ' selected' : '' ?>>None in force - billed on the defaults</option>
<?php foreach (contractTemplates() as $filter_template_id => $filter_template) { ?>

View File

@@ -333,7 +333,7 @@ $search_title = $invites_view ? 'Email, name or client' : 'Name, title, email, p
<?php if ($client_url && !$invites_view) { ?>
<div class="col-lg-3 col-md-6">
<select class="form-select select2" name="location" onchange="this.form.submit()">
<option value="">- All Locations -</option>
<option value="">- Any location -</option>
<?php
$sql_locations_filter = mysqli_query($mysqli, "
SELECT location_id, location_name
@@ -351,7 +351,7 @@ $search_title = $invites_view ? 'Email, name or client' : 'Name, title, email, p
<?php } elseif (!$client_url) { ?>
<div class="col-lg-3 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation
@@ -371,7 +371,7 @@ $search_title = $invites_view ? 'Email, name or client' : 'Name, title, email, p
<?php if (!$invites_view) { ?>
<div class="col-lg-3 col-md-6">
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Tags -" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
// Tags in use on contacts in this scope, plus any already picked
$sql_tags_filter = mysqli_query($mysqli, "

View File

@@ -191,7 +191,7 @@ $csrf = $_SESSION['csrf_token'];
<?php if (!$client_url) { ?>
<div class="col-lg-3 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
if (contractsReady()) {
$sql_clients_filter = mysqli_query($mysqli, "SELECT DISTINCT client_id, client_name, client_abbreviation FROM clients

View File

@@ -207,7 +207,7 @@ $filter_url = function ($changes) use ($client_url) {
</div>
</div>
<div class="col-lg-3 col-md-6">
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Tags -" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
// Tags in use on credentials in this scope, plus any already picked
$sql_tags_filter = mysqli_query($mysqli, "
@@ -229,7 +229,7 @@ $filter_url = function ($changes) use ($client_url) {
<div class="col-lg-3 col-md-6">
<?php if ($client_url) { ?>
<select class="form-select select2" name="location" onchange="this.form.submit()">
<option value="">- All Asset Locations -</option>
<option value="">- Any asset location -</option>
<?php
$sql_locations_filter = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_client_id = $client_id AND location_archived_at IS NULL ORDER BY location_name ASC");
while ($row = mysqli_fetch_assoc($sql_locations_filter)) {
@@ -239,7 +239,7 @@ $filter_url = function ($changes) use ($client_url) {
</select>
<?php } else { ?>
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation

View File

@@ -105,7 +105,7 @@ $tell_client = intval($config_ticket_client_general_notifications) === 1;
<div class="input-group input-group-sm">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" data-dispatch-filter="client_id" aria-label="Client">
<option value="">All clients</option>
<option value="">- Any client -</option>
<?php foreach ($clients as $client) { ?>
<option value="<?= intval($client['client_id']) ?>"><?= escapeHtml($client['client_name']) ?></option>
<?php } ?>
@@ -114,7 +114,7 @@ $tell_client = intval($config_ticket_client_general_notifications) === 1;
<div class="input-group input-group-sm">
<span class="input-group-text"><i class="fas fa-fw fa-thermometer-half"></i></span>
<select class="form-select select2" data-dispatch-filter="priority" aria-label="Priority">
<option value="">Any priority</option>
<option value="">- Any priority -</option>
<?php foreach (TICKET_PRIORITIES as $priority) { ?>
<option><?= escapeHtml($priority) ?></option>
<?php } ?>

View File

@@ -181,7 +181,7 @@ $bulk_vendor_options = $can_edit ? domainVendorChoices($client_url ? $client_id
</div>
</div>
<div class="col-lg-3 col-md-6">
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Tags -" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
// Tags in use on domains in this scope, plus any already picked
$sql_tags_filter = mysqli_query($mysqli, "
@@ -212,7 +212,7 @@ $bulk_vendor_options = $can_edit ? domainVendorChoices($client_url ? $client_id
<?php if (!$client_url) { ?>
<div class="col-lg-2 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation

View File

@@ -97,7 +97,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-piggy-bank"></i></span>
<select class="form-select select2" name="account" required>
<option value="">- Which account or card -</option>
<option value="">- Select an account -</option>
<?php foreach ($accounts as $account_id => $row) { ?>
<option value="<?= $account_id ?>" <?= $account_id === intval($config_default_expense_account) ? 'selected' : '' ?> data-icon="fas fa-piggy-bank"
data-description="<?= escapeHtml(billingMoney($row['balance'], $row['account_currency_code'])) ?>"><?= escapeHtml($row['account_name']) ?></option>
@@ -110,7 +110,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select select2" name="payment_method">
<option value="">- How they were paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($methods as $method) { ?>
<option value="<?= escapeHtml($method) ?>" <?= $method === (string) $config_default_expense_payment_method ? 'selected' : '' ?>><?= escapeHtml($method) ?></option>
<?php } ?>
@@ -317,7 +317,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<?php } else { ?>
<td class="itflow-import-pick">
<select class="form-select form-select-sm" data-import-vendor data-value="<?= escapeHtml($vendor_value) ?>" aria-label="Vendor">
<option value="">- Vendor -</option>
<option value="">- Select a vendor -</option>
<option value="new">+ New vendor</option>
<?= $vendor_options ?>
</select>
@@ -325,7 +325,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
</td>
<td class="itflow-import-pick">
<select class="form-select form-select-sm" data-import-category data-value="<?= intval($line['category_id']) ?: '' ?>" aria-label="Category">
<option value="">- Category -</option>
<option value="">- Select a category -</option>
<?= $category_options ?>
</select>
</td>

View File

@@ -57,7 +57,7 @@ while ($row = mysqli_fetch_row($sql_ticket_template_tags)) {
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
<select class="form-select select2" id="ticket_template_select" name="<?= escapeHtml($ticket_template_field) ?>" data-template-picker<?= $ticket_template_apply_on_load ? ' data-template-apply="1"' : '' ?>>
<option value="0">- No Template -</option>
<option value="0">- No template -</option>
<?php foreach ($ticket_template_rows as $id => $row) {
$tasks = $ticket_template_tasks[$id] ?? [];
$fill_ins = ticketTemplateFillIns($row, $tasks, $ticket_template_fill_in_rows[$id] ?? []);

View File

@@ -20,7 +20,7 @@ $header = $import['header'];
$two = $guess['amount'] === null && ($guess['debit'] !== null || $guess['credit'] !== null);
$column_select = function ($name, $selected, $optional, $attrs = '') use ($header) {
$html = '<select class="form-select" name="' . $name . '" ' . $attrs . '>';
$html .= '<option value="">' . ($optional ? '- None -' : '- Pick the column -') . '</option>';
$html .= '<option value="">' . ($optional ? '- None -' : '- Select a column -') . '</option>';
foreach ($header as $c => $label) {
$html .= '<option value="' . $c . '"' . ($selected !== null && intval($selected) === $c ? ' selected' : '') . '>' . escapeHtml($label) . '</option>';
}

View File

@@ -95,7 +95,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-piggy-bank"></i></span>
<select class="form-select select2" name="account" required>
<option value="">- Which account -</option>
<option value="">- Select an account -</option>
<?php foreach ($accounts as $account_id => $row) { ?>
<option value="<?= $account_id ?>" <?= $account_id === intval($config_default_payment_account) ? 'selected' : '' ?> data-icon="fas fa-piggy-bank"
data-description="<?= escapeHtml(billingMoney($row['balance'], $row['account_currency_code'])) ?>"><?= escapeHtml($row['account_name']) ?></option>
@@ -108,7 +108,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select select2" name="payment_method">
<option value="">- How they paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($methods as $method) { ?>
<option value="<?= escapeHtml($method) ?>" <?= $method === (string) $config_default_payment_method ? 'selected' : '' ?>><?= escapeHtml($method) ?></option>
<?php } ?>
@@ -350,7 +350,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
<td class="itflow-import-pick itflow-import-details">
<div data-income-for="payment">
<select class="form-select form-select-sm" data-income-payer data-value="<?= $action === 'payment' ? intval($line['client_id']) : '' ?>" aria-label="Paid by client">
<option value="">- Which client paid -</option>
<option value="">- Select a client -</option>
<?= $payer_options ?>
</select>
<div class="itflow-import-invoices mt-1" data-income-invoices data-value="<?= escapeHtml(implode(',', $line['invoice_ids'])) ?>"></div>
@@ -358,7 +358,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
</div>
<div data-income-for="income">
<select class="form-select form-select-sm" data-income-category data-value="<?= intval($line['category_id']) ?: '' ?>" aria-label="Category">
<option value="">- Category -</option>
<option value="">- Select a category -</option>
<?= $category_options ?>
</select>
<select class="form-select form-select-sm mt-1" data-income-client data-value="<?= $action === 'income' ? intval($line['client_id']) : 0 ?>" aria-label="From client">
@@ -368,7 +368,7 @@ $steps = ['upload' => 'Statement', 'columns' => 'Columns', 'review' => 'Review']
</div>
<div data-income-for="transfer">
<select class="form-select form-select-sm" data-income-account data-value="<?= intval($line['from_account_id']) ?: '' ?>" aria-label="From account">
<option value="">- From which of your accounts -</option>
<option value="">- Select an account -</option>
<?= $account_options ?>
</select>
<div class="small text-body-secondary mt-1">Money moved between your accounts - not income.</div>

View File

@@ -261,7 +261,7 @@ $stat_money = function ($amount) use ($session_company_currency) {
<?php if (!$client_url) { ?>
<div class="col-lg-2 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT DISTINCT client_id, client_name, client_abbreviation FROM clients
JOIN invoices ON invoice_client_id = client_id

View File

@@ -157,7 +157,7 @@
control = document.createElement('select');
control.className = 'form-select' + (fillIn.type === 'list' ? ' select2' : '');
const choices = fillIn.type === 'yesno' ? ['Yes', 'No'] : (fillIn.options || []);
control.appendChild(new Option('- Choose -', ''));
control.appendChild(new Option('- Select one -', ''));
choices.forEach(function (choice) {
control.appendChild(new Option(choice, choice));
});

View File

@@ -494,7 +494,7 @@
const projects = response.projects || [];
// Projects dropdown
const projectSelectDropdown = resetDropdown("projectSelect", '- Select Project -', '0');
const projectSelectDropdown = resetDropdown("projectSelect", '- Select a project -', '0');
// Populate dropdown - the client's own, then our internal ones
projects.forEach(project => {

View File

@@ -149,7 +149,7 @@ $locations_counts = locationCounts(array_keys($locations));
<?php if (!$client_url) { ?>
<div class="col-lg-3 col-md-6">
<select class="form-select select2" name="client" onchange="this.form.submit()">
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "
SELECT DISTINCT client_id, client_name, client_abbreviation
@@ -167,7 +167,7 @@ $locations_counts = locationCounts(array_keys($locations));
</div>
<?php } ?>
<div class="col-lg-3 col-md-6">
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Tags -" multiple>
<select onchange="this.form.submit()" class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?php
// Tags in use on locations in this scope, plus any already picked
$sql_tags_filter = mysqli_query($mysqli, "

View File

@@ -52,7 +52,7 @@ $form_types = accountTypes();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-money-bill"></i></span>
<select class="form-select select2" name="currency_code" required <?= $form_locked ? 'disabled' : '' ?>>
<option value="">- Currency -</option>
<option value="">- Select a currency -</option>
<?php foreach ($currencies_array as $currency_code => $currency_name) { ?>
<option <?= $form_currency === $currency_code ? 'selected' : '' ?> value="<?= escapeHtml($currency_code) ?>"><?= escapeHtml("$currency_code - $currency_name") ?></option>
<?php } ?>

View File

@@ -62,7 +62,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select select2" name="bulk_category" data-template-field="category">
<option value="0">- Not Categorized -</option>
<option value="0">- Not categorized -</option>
<?= categoryOptionsHtml('Ticket') ?>
</select>
<?= categoryAddButtonHtml('Ticket') ?>
@@ -77,7 +77,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
<select class="form-select select2" name="bulk_assigned_to" data-template-field="assigned">
<option value="0">Not Assigned</option>
<option value="0">- Unassigned -</option>
<?php
$sql = mysqli_query(

View File

@@ -30,7 +30,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="bulk_contact_id">
<option value="">- Contact -</option>
<option value="">- Select a contact -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_client_id, contact_photo, contact_title FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");

View File

@@ -31,7 +31,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="bulk_location_id">
<option value="">- Location -</option>
<option value="">- Select a location -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");

View File

@@ -25,7 +25,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-circle"></i></span>
<select class="form-select select2" name="bulk_status">
<option value="">- Select Status -</option>
<option value="">- Select a status -</option>
<?= categoryOptionsHtml('asset_status') ?>
</select>
<?= categoryAddButtonHtml('asset_status') ?>

View File

@@ -32,7 +32,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select select2" name="bulk_client_id">
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php
$clients_sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL $client_select_query" . clientNotLeadSql() . clientScopeSql('client_id') . " ORDER BY client_name ASC");

View File

@@ -67,7 +67,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-desktop"></i></span>
<select class="form-select select2" name="type">
<option value="">- All Types -</option>
<option value="">- Any type -</option>
<?php foreach (assetTypeTabs() as $tab_key => $tab) { ?>
<option <?php if ($type_filter === $tab_key) { echo "selected"; } ?> value="<?= $tab_key ?>"><?= escapeHtml($tab['label']) ?></option>
<?php } ?>
@@ -81,7 +81,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM assets WHERE asset_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {
@@ -103,7 +103,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="location">
<option value="">- All Locations -</option>
<option value="">- Any location -</option>
<?php
$sql_locations_filter = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_client_id = $client_id AND location_archived_at IS NULL ORDER BY location_name ASC");
while ($row = mysqli_fetch_assoc($sql_locations_filter)) {
@@ -124,7 +124,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-circle"></i></span>
<select class="form-select select2" name="status">
<option value="">- All Statuses -</option>
<option value="">- Any status -</option>
<?= categoryFilterOptionsHtml('asset_status', $status_filter, "SELECT DISTINCT asset_status FROM assets WHERE asset_status IS NOT NULL AND asset_status <> ''" . ($client_id ? " AND asset_client_id = $client_id" : '') . clientScopeSql('asset_client_id')) ?>
</select>
</div>
@@ -134,7 +134,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="- All Tags -" multiple>
<select class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?= tagOptionsHtml('asset', $tag_filter) ?>
</select>
</div>

View File

@@ -151,7 +151,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>
@@ -165,7 +165,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-layer-group fa-fw"></i></span>
<select class="form-select select2" name="type" required>
<option value="">- Select Type -</option>
<option value="">- Select a type -</option>
<?php foreach ($asset_types_array as $asset_type_select => $asset_icon_select) { ?>
<option <?php if ($asset_type_select === $asset_type_raw) { echo "selected"; } ?><?= selectOptionData(['icon' => "fas $asset_icon_select"]) ?>><?= $asset_type_select ?></option>
<?php } ?>
@@ -192,7 +192,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-circle fa-fw" data-asset-form-icon="status" style="color: <?= $asset_form_icons['status'] ?>"></i></span>
<select class="form-select select2" name="status">
<option value="">- Status -</option>
<option value="">- Select a status -</option>
<?= categoryOptionsHtml('asset_status', html_entity_decode($asset_status)) ?>
</select>
<?= categoryAddButtonHtml('asset_status') ?>
@@ -209,7 +209,7 @@ $asset_form_icons = [
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('asset', $asset_tag_id_array) ?>
</select>
</div>
@@ -332,7 +332,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-map-marker-alt fa-fw"></i></span>
<select class="form-select select2" name="location">
<option value="">- Select Location -</option>
<option value="">- Select a location -</option>
<?php foreach ($location_options as $location_option) {
$location_option_id = intval($location_option['location_id']); ?>
<option value="<?= $location_option_id ?>" <?php if ($asset_location_id === $location_option_id) { echo "selected"; } ?>><?= escapeHtml($location_option['location_name']) ?><?= $location_option['location_archived_at'] ? ' (archived)' : '' ?></option>
@@ -387,7 +387,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-network-wired"></i></span>
<select class="form-select select2" name="network">
<option value="">- Select Network -</option>
<option value="">- Select a network -</option>
<?php foreach ($network_options as $network_option) {
$network_option_id = intval($network_option['network_id']); ?>
<option value="<?= $network_option_id ?>" <?php if ($asset_network_id === $network_option_id) { echo "selected"; } ?><?= selectOptionData(['description' => $network_option['network']]) ?>><?= escapeHtml($network_option['network_name']) ?><?= $network_option['network_archived_at'] ? ' (archived)' : '' ?></option>
@@ -471,7 +471,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
<select class="form-select select2" name="vendor">
<option value="">- Select Vendor -</option>
<option value="">- Select a vendor -</option>
<?php foreach ($vendor_options as $vendor_option) {
$vendor_option_id = intval($vendor_option['vendor_id']); ?>
<option value="<?= $vendor_option_id ?>" <?php if ($asset_vendor_id === $vendor_option_id) { echo "selected"; } ?><?= selectOptionVendor($vendor_option['vendor_name'], $vendor_option['vendor_description']) ?>><?= escapeHtml($vendor_option['vendor_name']) ?><?= $vendor_option['vendor_archived_at'] ? ' (archived)' : '' ?></option>

View File

@@ -96,7 +96,7 @@ $form_scope_placeholder = [
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select select2" name="category" required>
<option value="">- Category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Income', $form_category_id, ['since' => $form_edit ? $form_value('created_at') : null]) ?>
</select>
<?= categoryAddButtonHtml('Income') ?>

View File

@@ -129,7 +129,7 @@ ob_start();
<input type="hidden" name="event_id" value="<?= $event_id ?>">
<div class="input-group flex-grow-1 w-auto" style="min-width: 14rem">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="agents[]" multiple data-placeholder="Nobody - pick agents">
<select class="form-select select2" name="agents[]" multiple data-placeholder="- Nobody - select agents -">
<?php foreach (calendarEventAgentChoices(array_map(function ($attendee) { return intval($attendee['attendee_user_id']); }, $agents)) as $user_id => $row) { ?>
<option value="<?= $user_id ?>"<?= selectOptionUser($user_id, $row['user_name'], $row['user_avatar']) ?> <?= in_array($user_id, array_map(function ($attendee) { return intval($attendee['attendee_user_id']); }, $agents), true) ? 'selected' : '' ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>

View File

@@ -46,7 +46,7 @@ $form_agents = calendarEventAgentChoices($form_attendees['agents']);
<label class="form-label">Assigned to</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="agents[]" multiple data-placeholder="Pick agents">
<select class="form-select select2" name="agents[]" multiple data-placeholder="- Select agents -">
<?php foreach ($form_agents as $user_id => $row) { ?>
<option value="<?= $user_id ?>"<?= selectOptionUser($user_id, $row['user_name'], $row['user_avatar']) ?> <?= in_array($user_id, $form_attendees['agents'], true) ? 'selected' : '' ?>><?= escapeHtml($row['user_name']) ?></option>
<?php } ?>

View File

@@ -59,7 +59,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM certificates WHERE certificate_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {

View File

@@ -60,7 +60,7 @@ $has_pem = trim(html_entity_decode($certificate_public_key, ENT_QUOTES, 'UTF-8')
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required data-certificate-client>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>

View File

@@ -77,7 +77,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-link"></i></span>
<select class="form-select select2" data-tags="true" name="referral">
<option value="">- Select Referral -</option>
<option value="">- Select a referral -</option>
<?= categoryOptionsHtml('Referral') ?>
</select>
<?= categoryAddButtonHtml('Referral') ?>
@@ -96,7 +96,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('client', []) ?>
</select>
</div>
@@ -143,7 +143,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-globe-americas"></i></span>
<select class="form-select select2" name="country">
<option value="">- Select Country -</option>
<option value="">- Select a country -</option>
<?php foreach($countries_array as $country_name) { ?>
<option <?php if ($session_company_country == $country_name) { echo "selected"; } ?> data-iso2="<?= $country_iso2_array[$country_name] ?? '' ?>"><?= $country_name ?></option>
<?php } ?>

View File

@@ -35,7 +35,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-file-contract"></i></span>
<select class="form-select select2" name="contract_template_id" required data-bulk-contract-template>
<option value="">- Pick a template -</option>
<option value="">- Select a template -</option>
<?php foreach ($templates as $template_id => $template) { ?>
<option value="<?= intval($template_id) ?>"><?= escapeHtml($template['contract_template_name']) ?> - <?= escapeHtml(contractTypeLabel($template['contract_template_type'])) ?>, <?= escapeHtml(strtolower(contractTermLabel($template['contract_template_term_months']))) ?></option>
<?php } ?>

View File

@@ -63,7 +63,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select select2" name="bulk_category" data-template-field="category">
<option value="0">- Not Categorized -</option>
<option value="0">- Not categorized -</option>
<?= categoryOptionsHtml('Ticket') ?>
</select>
<?= categoryAddButtonHtml('Ticket') ?>
@@ -81,7 +81,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
<select class="form-select select2" name="bulk_assigned_to" data-template-field="assigned">
<option value="0">Not Assigned</option>
<option value="0">- Unassigned -</option>
<?php
$sql = mysqli_query(

View File

@@ -25,7 +25,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-link"></i></span>
<select class="form-select select2" name="bulk_referral">
<option value="">- Select a Referral -</option>
<option value="">- Select a referral -</option>
<?= categoryOptionsHtml('Referral') ?>
</select>
<?= categoryAddButtonHtml('Referral') ?>

View File

@@ -22,7 +22,7 @@
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-th-list"></i></span>
<select class="form-select select2" name="type" required>
<option value="0">- Select Credit Type -</option>
<option value="0">- Select a credit type -</option>
<option value="manual">Manual</option>
<option value="prepaid">Prepaid</option>
<option value="promotion">Promotion</option>
@@ -55,7 +55,7 @@
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client" required>
<option value="0">- Client (Optional) -</option>
<option value="0">- No client -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients ORDER BY client_name ASC");

View File

@@ -109,7 +109,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-link"></i></span>
<select class="form-select select2" data-tags="true" name="referral">
<option value="">- Select Referral -</option>
<option value="">- Select a referral -</option>
<?= categoryOptionsHtml('Referral', $row_referral) ?>
</select>
<?= categoryAddButtonHtml('Referral') ?>
@@ -129,7 +129,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('client', $client_tag_id_array) ?>
</select>
</div>

View File

@@ -75,7 +75,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-industry"></i></span>
<select class="form-select select2" name="industry">
<option value="">- All Industries -</option>
<option value="">- Any industry -</option>
<?php
$sql_industry_filter = mysqli_query($mysqli, "SELECT DISTINCT client_type FROM clients WHERE client_type != '' ORDER BY client_type ASC");
while ($row = mysqli_fetch_assoc($sql_industry_filter)) {
@@ -94,7 +94,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-share-alt"></i></span>
<select class="form-select select2" name="referral">
<option value="">- All Referrals -</option>
<option value="">- Any referral -</option>
<?php
$sql_referral_filter = mysqli_query($mysqli, "SELECT DISTINCT client_referral FROM clients WHERE client_referral != '' ORDER BY client_referral ASC");
while ($row = mysqli_fetch_assoc($sql_referral_filter)) {
@@ -112,7 +112,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="- All Tags -" multiple>
<select class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?= tagOptionsHtml('client', $tag_filter) ?>
</select>
</div>

View File

@@ -29,7 +29,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="bulk_location_id">
<option value="">- Select Location -</option>
<option value="">- Select a location -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");

View File

@@ -59,7 +59,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM contacts WHERE contact_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {
@@ -81,7 +81,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="location">
<option value="">- All Locations -</option>
<option value="">- Any location -</option>
<?php
$sql_locations_filter = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_client_id = $client_id AND location_archived_at IS NULL ORDER BY location_name ASC");
while ($row = mysqli_fetch_assoc($sql_locations_filter)) {
@@ -101,7 +101,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="- All Tags -" multiple>
<select class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?= tagOptionsHtml('contact', $tag_filter) ?>
</select>
</div>

View File

@@ -70,7 +70,7 @@ $contact_roles = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-users fa-fw"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>
@@ -106,7 +106,7 @@ $contact_roles = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-map-marker-alt fa-fw"></i></span>
<select class="form-select select2" name="location">
<option value="">- Select Location -</option>
<option value="">- Select a location -</option>
<?php foreach ($location_options as $location_option) {
$location_option_id = intval($location_option['location_id']); ?>
<option value="<?= $location_option_id ?>" <?php if ($contact_location_id === $location_option_id) { echo "selected"; } ?><?= selectOptionData(['description' => $location_option['location_primary'] ? 'Primary' : '']) ?>><?= escapeHtml($location_option['location_name']) ?><?= $location_option['location_archived_at'] ? ' (archived)' : '' ?></option>
@@ -259,7 +259,7 @@ $contact_roles = [
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-tags fa-fw"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('contact', $contact_tag_id_array) ?>
</select>
</div>

View File

@@ -133,7 +133,7 @@ $tab = 'contractTab' . bin2hex(random_bytes(3));
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required data-contract-client>
<option value="">- Pick a client -</option>
<option value="">- Select a client -</option>
<?php foreach ($c_clients as $client_option_id => $client_option) { ?>
<option value="<?= $client_option_id ?>"<?= selectOptionClient($client_option_id, $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>
@@ -183,7 +183,7 @@ $tab = 'contractTab' . bin2hex(random_bytes(3));
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="owner_id">
<option value="0">- No one -</option>
<option value="0">- Nobody -</option>
<?php foreach ($c_owners as $user_id => $owner) { ?>
<option value="<?= $user_id ?>"<?= $user_id === $c_owner_id ? ' selected' : '' ?><?= selectOptionUser($user_id, $owner['user_name'], $owner['user_avatar'] ?? '') ?>><?= escapeHtml($owner['user_name']) ?></option>
<?php } ?>

View File

@@ -94,7 +94,7 @@ if ($refuse !== '') { ?>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select select2" name="category">
<option value="0">- Category -</option>
<option value="0">- Select a category -</option>
<?= categoryOptionsHtml('Income') ?>
</select>
</div>

View File

@@ -56,7 +56,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM credentials WHERE credential_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {
@@ -76,7 +76,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="- All Tags -" multiple>
<select class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?= tagOptionsHtml('credential', $tag_filter) ?>
</select>
</div>

View File

@@ -70,7 +70,7 @@ $form_id = 'credentialForm' . ($credential_form_mode === 'edit' ? $credential_id
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>

View File

@@ -60,7 +60,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-puzzle-piece"></i></span>
<select class="form-select select2" name="document_template_id" required data-doc-template-select>
<option value="">- Pick a template -</option>
<option value="">- Select a template -</option>
<?php foreach ($templates as $template_id => $template) {
$used = $usage[$template_id]['count'] ?? 0;
$about = trim(implode(' · ', array_filter([isset($missing[$template_id]) ? 'this client should have one' : '', trim((string) $template['document_template_description']), $used ? 'used ' . $used . ' time' . ($used === 1 ? '' : 's') : '']))); ?>

View File

@@ -60,7 +60,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM domains WHERE domain_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {

View File

@@ -58,7 +58,7 @@ $form_id = 'domainForm' . ($domain_form_mode === 'edit' ? $domain_id : 'New');
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required data-domain-client>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>

View File

@@ -54,13 +54,13 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw <?= $fields[$field]['icon'] ?>"></i></span>
<?php if ($field === 'category') { ?>
<select class="form-select select2" name="value" required>
<option value="">- Pick a category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Expense') ?>
</select>
<?= categoryAddButtonHtml('Expense') ?>
<?php } elseif ($field === 'account') { ?>
<select class="form-select select2" name="value" required>
<option value="">- Pick an account -</option>
<option value="">- Select an account -</option>
<?php foreach (paymentAccounts() as $account_id => $account) { ?>
<option value="<?= $account_id ?>" data-icon="fas fa-piggy-bank" data-description="<?= escapeHtml(billingMoney($account['balance'], $account['account_currency_code'])) ?>"><?= escapeHtml($account['account_name']) ?></option>
<?php } ?>

View File

@@ -112,7 +112,7 @@ $form_markup = $form_row && !$form_refund ? floatval($form_row['expense_markup']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
<select class="form-select select2" name="vendor" required data-expense-vendor <?= $form_refund ? 'disabled' : '' ?>>
<option value="">- Who it was paid to -</option>
<option value="">- Select a vendor -</option>
<?php foreach ($form_vendors as $vendor_id => $vendor) { ?>
<option value="<?= $vendor_id ?>" <?= $form_vendor === $vendor_id ? 'selected' : '' ?><?= selectOptionVendor($vendor['vendor_name'], $vendor['vendor_archived_at'] ? 'Archived' : (string) $vendor['vendor_description']) ?>><?= escapeHtml($vendor['vendor_name']) ?></option>
<?php } ?>
@@ -146,7 +146,7 @@ $form_markup = $form_row && !$form_refund ? floatval($form_row['expense_markup']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
<select class="form-select select2" name="category" required data-expense-category>
<option value="">- What it was for -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Expense', $form_category) ?>
</select>
<?= categoryAddButtonHtml('Expense') ?>
@@ -180,7 +180,7 @@ $form_markup = $form_row && !$form_refund ? floatval($form_row['expense_markup']
$form_business_account = $form_edit && !$form_paid_by && isset($form_accounts[$form_account]) ? $form_account : bookkeepingAccount('expense'); ?>
<option value="<?= $form_business_account ?>" <?= !$form_paid_by ? 'selected' : '' ?> data-icon="fas fa-building" data-description="Paid by the business">The business</option>
<?php } else { ?>
<option value="">- Which account -</option>
<option value="">- Select an account -</option>
<?php foreach ($form_accounts as $account_id => $account) { ?>
<option value="<?= $account_id ?>" <?= !$form_paid_by && $form_account === $account_id ? 'selected' : '' ?> data-icon="fas fa-piggy-bank"
data-description="<?= escapeHtml(billingMoney($account['balance'], $account['account_currency_code'])) ?><?= $account['account_archived_at'] ? ' - archived' : '' ?>"><?= escapeHtml($account['account_name']) ?></option>
@@ -203,7 +203,7 @@ $form_markup = $form_row && !$form_refund ? floatval($form_row['expense_markup']
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select select2" name="payment_method" data-expense-method>
<option value="">- How it was paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($form_methods as $method) { ?>
<option value="<?= escapeHtml($method) ?>" <?= $form_method === $method ? 'selected' : '' ?>><?= escapeHtml($method) ?></option>
<?php } ?>

View File

@@ -69,7 +69,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-piggy-bank"></i></span>
<select class="form-select select2" name="account" required>
<option value="">- Which account -</option>
<option value="">- Select an account -</option>
<?php foreach ($accounts as $account_id => $account) { ?>
<option value="<?= $account_id ?>" <?= $account_id === $default_account ? 'selected' : '' ?> data-icon="fas fa-piggy-bank"
data-description="<?= escapeHtml(billingMoney($account['balance'], $account['account_currency_code'])) ?>"><?= escapeHtml($account['account_name']) ?></option>
@@ -90,7 +90,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select select2" name="payment_method">
<option value="">- How they were paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($methods as $method) { ?>
<option value="<?= escapeHtml($method) ?>"><?= escapeHtml($method) ?></option>
<?php } ?>

View File

@@ -79,20 +79,20 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw <?= $fields[$field]['icon'] ?>"></i></span>
<?php if ($field === 'category') { ?>
<select class="form-select select2" name="value" required>
<option value="">- Pick a category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Income', null, ['exclude' => ['Account Transfer']]) ?>
</select>
<?= categoryAddButtonHtml('Income') ?>
<?php } elseif ($field === 'account') { ?>
<select class="form-select select2" name="value" required>
<option value="">- Pick the account it went into -</option>
<option value="">- Select an account -</option>
<?php foreach (paymentAccounts() as $option_id => $account) { ?>
<option value="<?= $option_id ?>"><?= escapeHtml($account['account_name']) ?><?= $account['account_currency_code'] ? ' (' . escapeHtml($account['account_currency_code']) . ')' : '' ?></option>
<?php } ?>
</select>
<?php } elseif ($field === 'method') { ?>
<select class="form-select select2" name="value" required>
<option value="">- Pick how it was paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach (paymentMethods('in') as $method) { ?>
<option><?= escapeHtml($method) ?></option>
<?php } ?>

View File

@@ -123,7 +123,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-money-check-alt"></i></span>
<select class="form-select select2" name="payment_method" required>
<option value="">- How they were paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($pay_methods as $method) { ?>
<option <?= $config_default_payment_method === $method ? 'selected' : '' ?>><?= escapeHtml($method) ?></option>
<?php } ?>

View File

@@ -27,7 +27,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select select2" name="bulk_category_id" required>
<option value="">- Pick a category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Income') ?>
</select>
<?= categoryAddButtonHtml('Income') ?>

View File

@@ -56,7 +56,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-file-invoice-dollar"></i></span>
<select class="form-select select2" name="status">
<option value="">- All Statuses -</option>
<option value="">- Any status -</option>
<option <?php if ($status_filter === 'Draft') { echo "selected"; } ?> value="Draft">Draft</option>
<option <?php if ($status_filter === 'Unpaid') { echo "selected"; } ?> value="Unpaid">Unpaid</option>
<option <?php if ($status_filter === 'Overdue') { echo "selected"; } ?> value="Overdue">Overdue</option>
@@ -71,7 +71,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
<select class="form-select select2" name="category">
<option value="">- All Categories -</option>
<option value="">- Any category -</option>
<?= categoryFilterOptionsHtml('Income', $category_filter, "SELECT DISTINCT invoice_category_id FROM invoices") ?>
</select>
</div>

View File

@@ -105,7 +105,7 @@ $kb_form_audience = $kb_form_mode === 'edit' ? kbAudienceFields($kb_form) : ['vi
<label class="form-label">Clients</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-users"></i></span>
<select class="form-select select2" name="client_ids[]" multiple data-placeholder="Pick clients">
<select class="form-select select2" name="client_ids[]" multiple data-placeholder="- Select clients -">
<?php
$kb_form_picked = array_map('intval', $kb_form_audience['client_ids']);
$kb_form_keep = $kb_form_picked ? ' OR clients.client_id IN (' . implode(',', $kb_form_picked) . ')' : '';

View File

@@ -86,7 +86,7 @@ ob_start();
<label class="form-label">Which <?= strtolower($k['plural']) ?>?</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw <?= $k['icon'] ?>"></i></span>
<select class="form-select select2" name="ids[]" multiple data-placeholder="Pick one or more <?= strtolower($k['plural']) ?>" <?= $kind_key === $kind ? '' : 'disabled' ?> data-assign-select="<?= $kind_key ?>">
<select class="form-select select2" name="ids[]" multiple data-placeholder="- Select one or more <?= strtolower($k['plural']) ?> -" <?= $kind_key === $kind ? '' : 'disabled' ?> data-assign-select="<?= $kind_key ?>">
<?php foreach ($candidates as $row) {
$where = $row['current_location'] ? 'At ' . $row['current_location'] : 'No location';
$description = implode(' · ', array_filter([$row['detail'], $where]));

View File

@@ -56,7 +56,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM locations WHERE location_client_id = client_id)" . clientScopeSql('client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {
@@ -76,7 +76,7 @@ ob_start();
<label class="form-label">Tags</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="- All Tags -" multiple>
<select class="form-select select2" name="tags[]" data-placeholder="- Any tag -" multiple>
<?= tagOptionsHtml('location', $tag_filter) ?>
</select>
</div>

View File

@@ -62,7 +62,7 @@ $form_id = 'locationForm' . ($location_form_mode === 'edit' ? $location_id : 'Ne
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>
@@ -101,7 +101,7 @@ $form_id = 'locationForm' . ($location_form_mode === 'edit' ? $location_id : 'Ne
<input type="hidden" name="tags_form" value="1">
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
<select class="form-select select2" name="tags[]" data-placeholder="Add some tags" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<select class="form-select select2" name="tags[]" data-placeholder="- Select tags -" multiple<?= !empty($session_is_admin) ? ' data-tags="true"' : '' ?>>
<?= tagOptionsHtml('location', $location_tag_ids) ?>
</select>
</div>
@@ -156,7 +156,7 @@ $form_id = 'locationForm' . ($location_form_mode === 'edit' ? $location_id : 'Ne
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-globe-americas"></i></span>
<select class="form-select select2" name="country">
<option value="">- Country -</option>
<option value="">- Select a country -</option>
<?php foreach ($countries_array as $country_name) { ?>
<option <?= $location_country === $country_name ? 'selected' : '' ?> data-iso2="<?= $country_iso2_array[$country_name] ?? '' ?>"><?= $country_name ?></option>
<?php } ?>

View File

@@ -56,7 +56,7 @@ ob_start();
<span class="input-group-text"><i class="fas fa-fw fa-map-marker-alt"></i></span>
<select class="form-select select2" name="location_id">
<option value="">- No change -</option>
<option value="0" data-icon="fas fa-times">No site</option>
<option value="0" data-icon="fas fa-times">- No site -</option>
<?php foreach ($locations as $location) { ?>
<option value="<?= intval($location['location_id']) ?>" data-icon="fas fa-<?= intval($location['location_primary']) ? 'building' : 'map-marker-alt' ?>"><?= escapeHtml($location['location_name']) ?></option>
<?php } ?>

View File

@@ -60,7 +60,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<?php
$sql_clients_filter = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE EXISTS (SELECT 1 FROM networks WHERE network_client_id = client_id) " . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql_clients_filter)) {

View File

@@ -70,7 +70,7 @@ $value = function ($key) use ($form) {
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" required>
<option value="">- Select Client -</option>
<option value="">- Select a client -</option>
<?php foreach ($client_options as $client_option) { ?>
<option value="<?= intval($client_option['client_id']) ?>"<?= selectOptionClient($client_option['client_id'], $client_option['client_name'], $client_option['client_abbreviation'] ?? '') ?>><?= escapeHtml($client_option['client_name']) ?></option>
<?php } ?>

View File

@@ -60,7 +60,7 @@ $pay_lock = $pay['lock'] ?? null;
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-money-check-alt"></i></span>
<select class="form-select select2" name="payment_method" required>
<option value="">- How it was paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach ($pay_methods as $method) { ?>
<option <?= $pay_method === $method ? 'selected' : '' ?>><?= escapeHtml($method) ?></option>
<?php } ?>

View File

@@ -73,7 +73,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
<select class="form-select select2" name="category">
<option value="">- All Categories -</option>
<option value="">- Any category -</option>
<?= categoryFilterOptionsHtml('Income', $category_filter, "SELECT DISTINCT product_category_id FROM products") ?>
</select>
</div>
@@ -84,7 +84,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-building"></i></span>
<select class="form-select select2" name="vendor">
<option value="">- All Vendors -</option>
<option value="">- Any vendor -</option>
<?php foreach (productVendors() as $filter_vendor_id => $filter_vendor_name) { ?>
<option <?php if ($vendor_filter === $filter_vendor_id) { echo "selected"; } ?> value="<?= $filter_vendor_id ?>"><?= escapeHtml($filter_vendor_name) ?></option>
<?php } ?>

View File

@@ -77,7 +77,7 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-list"></i></span>
<select class="form-select select2" name="category" required>
<option value="">- Category -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Income', $form_category_id) ?>
</select>
<?= categoryAddButtonHtml('Income') ?>
@@ -153,7 +153,7 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-building"></i></span>
<select class="form-select select2" name="vendor">
<option value="0">- Who you buy it from -</option>
<option value="0">- Select a vendor -</option>
<?php foreach ($form_vendors as $vendor_id => $vendor_name) { ?>
<option value="<?= intval($vendor_id) ?>" <?= $form_vendor_id === intval($vendor_id) ? 'selected' : '' ?>><?= escapeHtml($vendor_name) ?></option>
<?php } ?>

View File

@@ -34,7 +34,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-project-diagram"></i></span>
<select class="form-select select2" name="project_template_id" required>
<option value="">Pick a template...</option>
<option value="">- Select a template -</option>
<?php while ($row = mysqli_fetch_assoc($sql_templates)) {
$ticket_count = intval($row['ticket_count']);
$task_count = intval($row['task_count']); ?>

View File

@@ -30,7 +30,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="project_manager">
<option value="0" data-icon="fas fa-user-slash">No manager</option>
<option value="0" data-icon="fas fa-user-slash">- No manager -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users WHERE user_type = 1" . serviceAccountsOutSql() . " AND user_status = 1 AND user_archived_at IS NULL
ORDER BY user_id = " . intval($session_user_id) . " DESC, user_name ASC");

View File

@@ -81,7 +81,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client">
<option value="">- All Clients -</option>
<option value="">- Any client -</option>
<option value="internal" <?= $client_filter === 'internal' ? 'selected' : '' ?>>Internal (no client)</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients

View File

@@ -22,7 +22,7 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select select2" name="client_id" id="projectClientSelect" required>
<option value="">- Pick a client -</option>
<option value="">- Select a client -</option>
<option value="0" data-icon="fas fa-building" data-description="Our own work - no client">Internal</option>
<?php
$sql = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL" . clientNotLeadSql() . clientScopeSql('clients.client_id') . " ORDER BY client_name ASC");
@@ -82,7 +82,7 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-user-tie"></i></span>
<select class="form-select select2" name="project_manager">
<option value="0" data-icon="fas fa-user-slash">No manager</option>
<option value="0" data-icon="fas fa-user-slash">- No manager -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT user_id, user_name, user_avatar FROM users
WHERE user_type = 1" . serviceAccountsOutSql() . " AND ((user_status = 1 AND user_archived_at IS NULL) OR user_id = $form_manager_id)
@@ -99,7 +99,7 @@ $form_manager_id = intval($form['project_manager'] ?? 0);
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-address-card"></i></span>
<select class="form-select select2" name="contact_id" id="projectContactSelect" data-selected="<?= $form_contact_id ?>">
<option value="0">Nobody</option>
<option value="0">- Nobody -</option>
<?php if ($form_client_id) {
$sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_title, contact_photo, contact_primary, contact_technical FROM contacts
WHERE contact_client_id = $form_client_id AND (contact_archived_at IS NULL OR contact_id = $form_contact_id)

View File

@@ -62,7 +62,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-list"></i></span>
<select class="form-select select2" name="category" required>
<option value="">- What it was for -</option>
<option value="">- Select a category -</option>
<?= categoryOptionsHtml('Expense', $category) ?>
</select>
</div>
@@ -75,7 +75,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-piggy-bank"></i></span>
<select class="form-select select2" name="account" required>
<option value="">- Which account -</option>
<option value="">- Select an account -</option>
<?php foreach ($accounts as $account_id => $row) { ?>
<option value="<?= $account_id ?>" <?= $account === $account_id ? 'selected' : '' ?> data-icon="fas fa-piggy-bank" data-description="<?= escapeHtml(billingMoney($row['balance'], $row['account_currency_code'])) ?>"><?= escapeHtml($row['account_name']) ?></option>
<?php } ?>
@@ -88,7 +88,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-credit-card"></i></span>
<select class="form-select select2" name="payment_method">
<option value="">- How it was paid -</option>
<option value="">- Select a payment method -</option>
<?php foreach (paymentMethods('out') as $option) { ?>
<option <?= $option === $method ? 'selected' : '' ?>><?= escapeHtml($option) ?></option>
<?php } ?>

View File

@@ -53,7 +53,7 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-building"></i></span>
<select class="form-select select2" name="vendor" required>
<option value="">- Who it is from -</option>
<option value="">- Select a vendor -</option>
<?php foreach (poVendors() as $option_id => $option_name) { ?>
<option value="<?= $option_id ?>" <?= $option_id === $vendor_id ? 'selected' : '' ?>><?= escapeHtml($option_name) ?></option>
<?php } ?>

Some files were not shown because too many files have changed in this diff Show More