Use the standard picker for the last 78 plain dropdowns in agent and admin windows, with the picker keeping w-auto, flex-grow-0 and max-width from the select so narrow ones stay narrow

This commit is contained in:
johnnyq
2026-11-20 23:57:43 -05:00
parent df64d82f3a
commit 31c34fd92a
49 changed files with 89 additions and 79 deletions

View File

@@ -186,7 +186,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
- Timers: the timers panel says how much time you logged on tickets today and this week - the week starting on the day your calendar does.
- Calendar: an event can remind you - when it starts, or from five minutes to two days before. The agents it's assigned to get a notification, or whoever made it when nobody is, and each time a repeating event comes round. Your account > Preferences has Remind me before work booked for me, for tickets booked with you, and Email me reminders too. Reminders need cron, and go within a minute.
- Projects: a project has a Timeline - its booked tickets as bars in time, from its start to its due date, with now marked. A booking that is past and still open shows in amber, and two of the same agent's at the same time are flagged. Its open tickets with no booking are listed under it, with Book.
- Pickers: long lists of clients, contacts, vendors, categories, locations, assets, technicians, projects, accounts and products start with the last five you picked in a field like it, under Recent, above All. Typing searches everything as before.
- Pickers: long lists of clients, contacts, vendors, categories, locations, assets, technicians, projects, accounts and products start with the last five you picked in a field like it, under Recent, above All. Typing searches everything as before. Every dropdown in a window is now one of these pickers - the last plain ones, such as a line's tax and frequency, how long a booking is and whether it is onsite, and a ticket status's SLA setting, too.
- Archived: Tools > Archived lists what was archived lately - clients, contacts, locations, vendors, assets, credentials, documents, files, domains, certificates, networks, racks, services, licenses, projects and products - newest first, with who archived each one, to restore one or several at once. The last 30 days to start with, or pick another time, a kind or a client.
- Undo: archiving no longer asks "Are you sure?" - the message that says it's done has Undo instead, as do moves and changes to several records at once. The message stays up for ten seconds, or as long as the pointer is on it, and only its x closes it - set apart from Undo, so a click that just misses Undo doesn't lose it. Undo covers archiving one or several of every kind Archived lists, bringing back what archiving took with it - a contact's roles, a document's links, a client's recurring invoices; moving files, documents and folders, dragged or with Move; dragging kit on a rack; and the bulk changes to a ticket's priority, category or project, an asset's location, physical location, contact or status, a contact's location, department, phone number or roles, a client's industry or referral, a project's manager or due date, an invoice's or product's category, and an IP address's type. In Admin, Undo is on archiving tags and categories (one or several), canned responses, ticket, project, document, vendor, license and contract templates, roles, payment methods (a default it stopped being comes back with it), SLAs, custom links, portal announcements and banners, on archiving a tax, and on switching off a ticket status - those last two when nothing was moved to another. A payment method is archived without asking first now. In Admin, as everywhere else, the message after archiving, removing, unlinking or cancelling something is red and the one after restoring it or Undo is green. Undo works once and only for whoever made the change, and leaves anything changed again since as it is, saying how many. Archiving a client still asks first, and has no Undo when it withdrew a contract out for signing. Archiving a client (one or several), a ticket reply, an account or an SLA, and restoring anything archived, no longer asks first either - the ticket reply and the account have Undo too.
- Client portal: one Search box in the top bar looks through the client's tickets - their subject, number and what was said on them - the documents you share with them and your Help articles at once, the first eight of each with See all. Nothing found offers Ask us, and a search with no Help article goes on the Knowledge Base's Not found list.
@@ -433,6 +433,7 @@ Update from Maintenance > Update — Queue Update hands the job to cron, which u
- First reply assigns: database 4.0.9 adds `settings.config_ticket_reply_assigns` (on to start with), read by `ticketReplyAssigns()` in `functions/ticket_fields.php` (on before the update). In `add_ticket_reply` (`agent/post/ticket.php`), a Public reply on a ticket with `ticket_assigned_to = 0` calls `ticketChangeAssignee($ticket_id, $session_user_id)` after the first response is set - so moving New to Open sends no "ticket assigned" message - with its internal note, history, audit and `ticket_assign` custom action. Bulk replies, AI notes and the no-response resolve leave the assignee alone.
- Dates: `formatDate()`, `formatDateTime()` (with `$seconds` for logs), `formatTime()` and `formatDay()` in `functions/format.php` show a stored date or time (or a timestamp) as `M j, Y`, `M j, Y g:i A`, `g:i A` and `D, M j, Y`, and give '' for nothing or a zero date. Raw `Y-m-d` values printed on pages, windows, `includes/billing_paper.php`, `functions/billing_pdf.php` and the guest pages now go through them, as do the `title` hovers beside `timeAgo()`; `billingEmailDate()` calls `formatDate()`; the odd `date()` formats (`g:ia`, `M d, Y • g:i A`, `D j M`, `F j, Y`, `m/d/Y`, `M y` and the like) are the standard ones; `$config_date_format` is `M j, Y`; and the scripts' `toLocale*String()` calls pass `en-US` so they match. New code uses the helpers.
- Messages: a note added to an asset or a contact sets its message with `flashAlert()`, its names escaped, rather than writing `$_SESSION['alert_message']` itself; the `archive_ticket_reply` and `archive_account` handlers offer Undo through `undoArchivedBefore()` / `undoOfferArchived()`; and the SLA list no longer builds the archive prompt's text.
- Pickers: the 78 plain `<select class="form-select">` left in `agent/modals` and `admin/modals` are `select2`, so `js/itflow_select.js` draws them; it now carries `w-auto`, `flex-grow-0`, `flex-shrink-0` and an inline `max-width` from the `<select>` to the picker, so one set narrow inside an input group stays narrow. Every select in a window is the picker now - new ones should be too.
## [26.11.8]

View File

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

View File

@@ -62,7 +62,7 @@ $l_description = (string) ($l['custom_link_description'] ?? '');
<label class="form-label">Shows in <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-bars"></i></span>
<select class="form-select" name="location" required data-custom-link-location>
<select class="form-select select2" name="location" required data-custom-link-location>
<?php foreach ($l_locations as $location => $location_config) { ?>
<option value="<?= $location ?>"<?= $location === $l_location ? ' selected' : '' ?> data-about="<?= escapeHtml($location_config['about']) ?>"><?= escapeHtml($location_config['label']) ?></option>
<?php } ?>

View File

@@ -149,7 +149,7 @@ if (!managerEnabled()) { ?>
<label class="form-label">Updates</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-download"></i></span>
<select class="form-select" name="update_policy">
<select class="form-select select2" name="update_policy">
<option value="manual" <?= $form['managed_instance_update_policy'] !== 'auto' ? 'selected' : '' ?>>By hand, from here</option>
<option value="auto" <?= $form['managed_instance_update_policy'] === 'auto' ? 'selected' : '' ?>>Automatically</option>
</select>

View File

@@ -43,7 +43,7 @@ if (!$payment_method) { ?>
<label class="form-label">Change them to <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-random"></i></span>
<select class="form-select" name="move_to" required>
<select class="form-select select2" name="move_to" required>
<option value="">- Pick a 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>

View File

@@ -42,7 +42,7 @@ $m_usage = $m ? paymentMethodUsageFor($m_name) : ['total' => 0];
<label class="form-label">Offered for</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
<select class="form-select" name="use">
<select class="form-select select2" name="use">
<?php foreach (PAYMENT_METHOD_USES as $value => $use) { ?>
<option value="<?= $value ?>"<?= $value === $m_use ? ' selected' : '' ?>><?= escapeHtml($use['label']) ?></option>
<?php } ?>

View File

@@ -86,7 +86,7 @@ ob_start();
<label class="form-label" for="paymentProviderName">Provider <strong class="text-danger">*</strong></label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select" name="provider" id="paymentProviderName">
<select class="form-select select2" name="provider" id="paymentProviderName">
<?php foreach ($kinds as $kind_name => $kind_info) { ?>
<option value="<?= escapeHtml($kind_name) ?>" <?= $kind_name === $name ? 'selected' : '' ?> <?= isset($taken[$kind_name]) ? 'disabled' : '' ?>><?= escapeHtml($kind_name) ?><?= isset($taken[$kind_name]) ? ' - set up already' : '' ?></option>
<?php } ?>

View File

@@ -56,7 +56,7 @@ ob_start();
<label class="form-label" for="smsProviderName">Provider <strong class="text-danger">*</strong></label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="fa fa-fw fa-sms"></i></span>
<select class="form-select" name="provider" id="smsProviderName">
<select class="form-select select2" name="provider" id="smsProviderName">
<?php foreach ($kinds as $kind_name => $kind_info) { ?>
<option value="<?= escapeHtml($kind_name) ?>" <?= $kind_name === $name ? 'selected' : '' ?> <?= isset($taken[$kind_name]) ? 'disabled' : '' ?>><?= escapeHtml($kind_name) ?><?= isset($taken[$kind_name]) ? ' - set up already' : '' ?></option>
<?php } ?>

View File

@@ -66,7 +66,7 @@ if (!$template) { ?>
<label class="form-label">Count</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select" name="count">
<select class="form-select select2" name="count">
<option value="total" <?= $count === 'total' ? 'selected' : '' ?>>The seats bought</option>
<option value="used" <?= $count === 'used' ? 'selected' : '' ?>>The seats in use - devices and users on it</option>
</select>
@@ -103,7 +103,7 @@ if (!$template) { ?>
<?php if ($options) { ?>
<div class="input-group input-group-sm">
<span class="input-group-text"><i class="fa fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="recurring[<?= $software_id ?>]">
<select class="form-select select2" name="recurring[<?= $software_id ?>]">
<?php foreach ($options as $recurring_id => $option) { ?>
<option value="<?= $recurring_id ?>" <?= $recurring_id === $default ? 'selected' : '' ?>><?= escapeHtml($option['number'] . ' · ' . (recurringInvoiceFrequencies()[$option['recurring_invoice_frequency']] ?? $option['recurring_invoice_frequency']) . (trim((string) $option['recurring_invoice_scope']) !== '' ? ' · ' . $option['recurring_invoice_scope'] : '') . (intval($option['recurring_invoice_status']) === 1 ? '' : ' (paused)')) ?></option>
<?php } ?>

View File

@@ -100,7 +100,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
<label class="form-label">Renews every</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="term">
<select class="form-select select2" name="term">
<option value="">- Doesn't renew -</option>
<?php foreach (SOFTWARE_RENEWAL_TERMS as $value => $label) { ?>
<option value="<?= escapeHtml($value) ?>" <?= $value === $term ? 'selected' : '' ?>><?= escapeHtml($label) ?></option>

View File

@@ -48,7 +48,7 @@ if (!in_array($t_icon, $t_icons, true)) {
<label class="form-label">For <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select" name="type"<?= $t_kind_locked ? ' disabled' : '' ?> required>
<select class="form-select select2" name="type"<?= $t_kind_locked ? ' disabled' : '' ?> required>
<?php foreach (tagKinds() as $kind_type => $kind_entity) {
$kind_config = tagEntity($kind_entity); ?>
<option value="<?= $kind_type ?>"<?= $kind_type === intval($type) ? ' selected' : '' ?>><?= $kind_config['title'] ?>s</option>

View File

@@ -47,7 +47,7 @@ if (!$tax || $tax['tax_archived_at']) { ?>
<label class="form-label">Move them to</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
<select class="form-select" name="move_to">
<select class="form-select select2" name="move_to">
<option value="0">Leave them where they are</option>
<?php foreach ($others as $id => $other) { ?>
<option value="<?= intval($id) ?>"><?= escapeHtml(taxLabel($other)) ?></option>

View File

@@ -87,7 +87,7 @@ $s_reply_value = $s_reply_to && isset($s_reply_choices["to-$s_reply_to"]) ? "to-
<?php if ($s_builtin) { ?>
<input type="text" class="form-control" value="<?= $s_id === TICKET_STATUS_CLOSED ? 'Stopped - the ticket is finished' : ($s_paused ? 'Paused while a ticket is in it' : 'Keeps running') ?>" readonly>
<?php } else { ?>
<select class="form-select" name="pauses_sla">
<select class="form-select select2" name="pauses_sla">
<option value="0"<?= $s_paused ? '' : ' selected' ?>>Keeps running - the ticket is being worked</option>
<option value="1"<?= $s_paused ? ' selected' : '' ?>>Paused - waiting on someone else</option>
</select>
@@ -127,7 +127,7 @@ $s_reply_value = $s_reply_to && isset($s_reply_choices["to-$s_reply_to"]) ? "to-
<label class="form-label">Counts as the first response</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-comment-dots"></i></span>
<select class="form-select" name="first_response">
<select class="form-select select2" name="first_response">
<?php foreach (TICKET_STATUS_FIRST_RESPONSE as $value => $first_response) { ?>
<option value="<?= $value ?>"<?= $value === $s_first_response ? ' selected' : '' ?>><?= escapeHtml($first_response['label']) ?></option>
<?php } ?>

View File

@@ -56,7 +56,7 @@ if (!$ticket_status || ticketStatusIsBuiltIn($ticket_status['ticket_status_id'])
<label class="form-label">Move <?= $tickets === 1 ? 'it' : 'them' ?> to <?php if ($delete) { ?><strong class="text-danger">*</strong><?php } ?></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-exchange-alt"></i></span>
<select class="form-select" name="move_to"<?= $delete ? ' required' : '' ?>>
<select class="form-select select2" name="move_to"<?= $delete ? ' required' : '' ?>>
<?php if (!$delete) { ?>
<option value="0">Leave them in <?= $name ?></option>
<?php } ?>

View File

@@ -141,7 +141,7 @@ $portal_client_ids = !empty($t['ticket_template_id']) ? ticketTemplatePortalClie
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-calendar-check"></i></span>
<input type="number" class="form-control" name="due_amount" min="0" max="8784" placeholder="No due date" value="<?= $due_amount ?>">
<select class="form-select" name="due_unit" style="max-width: 9rem;" aria-label="Hours or days">
<select class="form-select select2" name="due_unit" style="max-width: 9rem;" aria-label="Hours or days">
<option value="days" <?= $due_in_days ? 'selected' : '' ?>>days after</option>
<option value="hours" <?= $due_in_days ? '' : 'selected' ?>>hours after</option>
</select>
@@ -153,7 +153,7 @@ $portal_client_ids = !empty($t['ticket_template_id']) ? ticketTemplatePortalClie
<label class="form-label">Billable</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-dollar-sign"></i></span>
<select class="form-select" name="billable">
<select class="form-select select2" name="billable">
<option value="" <?= $billable === '' ? 'selected' : '' ?>>- Leave as it is -</option>
<option value="1" <?= $billable === '1' ? 'selected' : '' ?>>Billable</option>
<option value="0" <?= $billable === '0' ? 'selected' : '' ?>>Not billable</option>

View File

@@ -261,7 +261,7 @@ $asset_form_icons = [
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw <?= $spec['icon'] ?>"></i></span>
<?php if ($spec['input'] === 'select') { ?>
<select class="form-select" name="spec[<?= $spec_key ?>]" id="<?= $spec_id ?>">
<select class="form-select select2" name="spec[<?= $spec_key ?>]" id="<?= $spec_id ?>">
<option value="">-</option>
<?php foreach ($spec['options'] as $spec_option) { ?>
<option <?= strcasecmp($spec_option, $spec_value) === 0 ? 'selected' : '' ?>><?= escapeHtml($spec_option) ?></option>

View File

@@ -63,7 +63,7 @@ ob_start();
<label class="form-label">Numbers</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sort-numeric-down"></i></span>
<select class="form-select" name="pad" data-series="pad">
<select class="form-select select2" name="pad" data-series="pad">
<option value="0">1, 2 ... 10</option>
<option value="2" <?= $pad === 2 ? 'selected' : '' ?>>01, 02 ... 10</option>
<option value="3" <?= $pad === 3 ? 'selected' : '' ?>>001, 002 ... 010</option>

View File

@@ -150,7 +150,7 @@ $form_scope_placeholder = [
<label class="form-label">Billed <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sync-alt"></i></span>
<select class="form-select" name="frequency" required>
<select class="form-select select2" name="frequency" required>
<?php foreach (recurringInvoiceFrequencies() as $frequency => $label) { ?>
<option value="<?= $frequency ?>" <?= $form_value('frequency', 'month') === $frequency ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
@@ -185,7 +185,7 @@ $form_scope_placeholder = [
<label class="form-label">When it is made</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-paper-plane"></i></span>
<select class="form-select" name="auto_send">
<select class="form-select select2" name="auto_send">
<option value="1" <?= $form_value('auto_send', '1') === '1' ? 'selected' : '' ?>>Send it automatically</option>
<option value="0" <?= $form_value('auto_send', '1') === '0' ? 'selected' : '' ?>>Leave a draft to check</option>
</select>
@@ -212,7 +212,7 @@ $form_scope_placeholder = [
<label class="form-label">Due, when made ahead</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-calendar-check"></i></span>
<select class="form-select" name="due_mode">
<select class="form-select select2" name="due_mode">
<option value="terms" <?= $form_value('due_mode', 'terms') !== 'next' ? 'selected' : '' ?>>Its date, plus <?= escapeHtml($form_ahead_terms_label) ?></option>
<option value="next" <?= $form_value('due_mode', 'terms') === 'next' ? 'selected' : '' ?>>On its date</option>
</select>

View File

@@ -90,7 +90,7 @@ ob_start();
<label class="form-label">Billed</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="frequency">
<select class="form-select select2" name="frequency">
<?php foreach (quoteFrequencies() as $frequency_value => $frequency_label) { ?>
<option value="<?= $frequency_value ?>" <?= $line_frequency === $frequency_value ? 'selected' : '' ?>><?= $frequency_label ?></option>
<?php } ?>
@@ -121,7 +121,7 @@ ob_start();
<label class="form-label">Quantity from</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
<select class="form-select" name="seat_source" data-seat-source>
<select class="form-select select2" name="seat_source" data-seat-source>
<option value="">Typed in - the same every time</option>
<option value="contacts" <?= $seat_source === 'contacts' ? 'selected' : '' ?>>Users - the client's contacts (<?= intval($seat_options['contacts']) ?> now)</option>
<option value="assets" <?= $seat_source === 'assets' ? 'selected' : '' ?>>Devices - the client's devices in use (<?= intval($seat_options['assets']) ?> now)</option>
@@ -137,7 +137,7 @@ ob_start();
<label class="form-label">Which contacts</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select" name="seat_tag" data-seat-input>
<select class="form-select select2" name="seat_tag" data-seat-input>
<option value="0">All of them</option>
<?php foreach ($seat_options['contact_tags'] as $tag_id => $tag) { ?>
<option value="<?= $tag_id ?>" <?= $seat_source === 'contacts' && intval($seat_filter['tag'] ?? 0) === $tag_id ? 'selected' : '' ?>>Tagged <?= escapeHtml($tag['tag_name']) ?> (<?= intval($tag['n']) ?>)</option>
@@ -161,7 +161,7 @@ ob_start();
</div>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select" name="seat_tag" data-seat-input>
<select class="form-select select2" name="seat_tag" data-seat-input>
<option value="0">Any tag</option>
<?php foreach ($seat_options['asset_tags'] as $tag_id => $tag) { ?>
<option value="<?= $tag_id ?>" <?= $seat_source === 'assets' && intval($seat_filter['tag'] ?? 0) === $tag_id ? 'selected' : '' ?>>Tagged <?= escapeHtml($tag['tag_name']) ?> (<?= intval($tag['n']) ?>)</option>
@@ -188,7 +188,7 @@ ob_start();
<div class="<?= $seat_rmm_pick ? 'col-sm-6' : 'col-12' ?>">
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select" name="seat_tag" data-seat-input>
<select class="form-select select2" name="seat_tag" data-seat-input>
<option value="0">Any tag</option>
<?php foreach ($seat_options['managed_tags'] as $tag_id => $tag) { ?>
<option value="<?= $tag_id ?>" <?= $seat_source === 'managed' && intval($seat_filter['tag'] ?? 0) === $tag_id ? 'selected' : '' ?>>Tagged <?= escapeHtml($tag['tag_name']) ?> (<?= intval($tag['n']) ?>)</option>
@@ -200,7 +200,7 @@ ob_start();
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-laptop-medical"></i></span>
<select class="form-select" name="seat_rmm" data-seat-input>
<select class="form-select select2" name="seat_rmm" data-seat-input>
<?php if ($seat_rmm_gone) { ?>
<option value="<?= $seat_rmm ?>" selected>The RMM provider it counted is gone - pick another</option>
<?php } ?>
@@ -222,7 +222,7 @@ ob_start();
<label class="form-label">License</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-cube"></i></span>
<select class="form-select" name="seat_software_id" data-seat-input>
<select class="form-select select2" name="seat_software_id" data-seat-input>
<?php if ($seat_source === 'license' && !isset($seat_options['licenses'][intval($seat_filter['software_id'] ?? 0)])) { ?>
<option value="0" selected disabled>The license it counted is gone - pick another</option>
<?php } ?>
@@ -236,7 +236,7 @@ ob_start();
<label class="form-label">Count</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-calculator"></i></span>
<select class="form-select" name="seat_count" data-seat-input>
<select class="form-select select2" name="seat_count" data-seat-input>
<option value="used">Seats in use</option>
<option value="total" <?= ($seat_filter['count'] ?? '') === 'total' ? 'selected' : '' ?>>Seats bought</option>
</select>
@@ -281,7 +281,7 @@ ob_start();
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-line-tax>
<select class="form-select select2" name="tax_id" data-line-tax>
<?= taxOptionsHtml($taxes, $item['item_tax_id']) ?>
</select>
</div>

View File

@@ -118,7 +118,7 @@ $form_agents = calendarEventAgentChoices($form_attendees['agents']);
<label class="form-label small text-body-secondary mb-1" for="eventRepeat">Repeats</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo"></i></span>
<select class="form-select" name="repeat" id="eventRepeat">
<select class="form-select select2" name="repeat" id="eventRepeat">
<option value="" <?= $form_repeat === '' ? 'selected' : '' ?>>Does not repeat</option>
<?php foreach (['Day' => 'Daily', 'Week' => 'Weekly', 'Month' => 'Monthly', 'Year' => 'Yearly'] as $value => $label) { ?>
<option value="<?= $value ?>" data-one="<?= CALENDAR_REPEATS[$value][1] ?>" data-many="<?= CALENDAR_REPEATS[$value][2] ?>" <?= $form_repeat === $value ? 'selected' : '' ?>><?= $label ?></option>
@@ -151,7 +151,7 @@ $form_agents = calendarEventAgentChoices($form_attendees['agents']);
<label class="form-label small text-body-secondary mb-1" for="eventReminder">Remind</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-bell"></i></span>
<select class="form-select" name="reminder" id="eventReminder">
<select class="form-select select2" name="reminder" id="eventReminder">
<?= calendarReminderOptions(isset($form['event_reminder']) && $form['event_reminder'] !== '' && $form['event_reminder'] !== null ? intval($form['event_reminder']) : null) ?>
</select>
</div>

View File

@@ -34,7 +34,7 @@ ob_start();
<label class="form-label">Template <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-file-contract"></i></span>
<select class="form-select" name="contract_template_id" required data-bulk-contract-template>
<select class="form-select select2" name="contract_template_id" required data-bulk-contract-template>
<option value="">- Pick 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>

View File

@@ -16,7 +16,7 @@ $contract_pick_templates = contractClientPickReady() ? contractTemplates() : [];
<label class="form-label"><?= $contract_pick_edit ? 'New contract' : 'Contract' ?></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-file-contract"></i></span>
<select class="form-select" name="contract_template_id" data-client-contract-template>
<select class="form-select select2" name="contract_template_id" data-client-contract-template>
<option value="0"><?= $contract_pick_edit ? '- None - keep its contracts as they are -' : '- None - bill on the defaults -' ?></option>
<?php foreach ($contract_pick_templates as $contract_pick_id => $contract_pick_template) { ?>
<option value="<?= intval($contract_pick_id) ?>"><?= escapeHtml($contract_pick_template['contract_template_name']) ?> - <?= escapeHtml(contractTypeLabel($contract_pick_template['contract_template_type'])) ?>, <?= escapeHtml(strtolower(contractTermLabel($contract_pick_template['contract_template_term_months']))) ?></option>

View File

@@ -73,7 +73,7 @@ if ($refuse !== '') { ?>
<label class="form-label">How often</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sync-alt"></i></span>
<select class="form-select" name="frequency">
<select class="form-select select2" name="frequency">
<?php foreach (recurringInvoiceFrequencies() as $key => $label) { ?>
<option value="<?= $key ?>"<?= $key === 'month' ? ' selected' : '' ?>><?= escapeHtml($label) ?></option>
<?php } ?>
@@ -120,7 +120,7 @@ if ($refuse !== '') { ?>
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id">
<select class="form-select select2" name="tax_id">
<?= taxOptionsHtml($taxes, taxDefaultFor($client_id, 'goods')) ?>
</select>
</div>

View File

@@ -75,7 +75,7 @@ ob_start();
<?php } ?>
</select>
<?php } elseif ($field === 'billable') { ?>
<select class="form-select" name="value" data-bulk-billable>
<select class="form-select select2" name="value" data-bulk-billable>
<option value="yes">Bill them on to their clients</option>
<option value="no">Our cost - not billed on</option>
</select>

View File

@@ -23,7 +23,7 @@ $tax_choices = billingTaxes();
<label class="form-label">Tax included</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-expense-tax-rate>
<select class="form-select select2" name="tax_id" data-expense-tax-rate>
<?= taxOptionsHtml($tax_choices, intval($tax_selected)) ?>
</select>
</div>

View File

@@ -74,7 +74,7 @@ ob_start();
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-add-expense-tax>
<select class="form-select select2" name="tax_id" data-add-expense-tax>
<?= taxOptionsHtml($taxes, taxDefaultFor($client_id, 'expense')) ?>
</select>
</div>

View File

@@ -96,7 +96,7 @@ ob_start();
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-add-ticket-tax>
<select class="form-select select2" name="tax_id" data-add-ticket-tax>
<?= taxOptionsHtml($taxes, taxDefaultFor($client_id, 'time')) ?>
</select>
</div>
@@ -105,7 +105,7 @@ ob_start();
<label class="form-label">Lines</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
<select class="form-select" name="lines">
<select class="form-select select2" name="lines">
<option value="each">One each</option>
<option value="one">One for all</option>
</select>

View File

@@ -72,7 +72,7 @@ ob_start();
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-add-trip-tax>
<select class="form-select select2" name="tax_id" data-add-trip-tax>
<?= taxOptionsHtml($taxes, taxDefaultFor($client_id, 'trip')) ?>
</select>
</div>

View File

@@ -83,7 +83,7 @@ ob_start();
<label class="form-label">Status</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-circle fa-fw" data-assets-status-icon style="color: <?= escapeHtml($statuses[$status_default] ?? 'var(--bs-secondary-color)') ?>"></i></span>
<select class="form-select" name="status" data-assets-status>
<select class="form-select select2" name="status" data-assets-status>
<option value="" data-color="var(--bs-secondary-color)">- No status -</option>
<?php foreach ($statuses as $status_name => $status_color) { ?>
<option value="<?= escapeHtml($status_name) ?>" data-color="<?= escapeHtml($status_color) ?>" <?= $status_name === $status_default ? 'selected' : '' ?>><?= escapeHtml($status_name) ?></option>
@@ -95,7 +95,7 @@ ob_start();
<label class="form-label">Location</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-map-marker-alt"></i></span>
<select class="form-select" name="location">
<select class="form-select select2" name="location">
<option value="0">- No location -</option>
<?php foreach ($locations as $location_id => $location_name) { ?>
<option value="<?= $location_id ?>" <?= $location_id === $location_default ? 'selected' : '' ?>><?= escapeHtml($location_name) ?></option>
@@ -158,7 +158,7 @@ ob_start();
<div class="col-md-3">
<div class="input-group input-group-sm">
<span class="input-group-text" title="New, or one already on file"><i class="fas fa-fw fa-link"></i></span>
<select class="form-select" name="<?= $field ?>[existing]" aria-label="New asset, or one they have" data-hw-existing>
<select class="form-select select2" name="<?= $field ?>[existing]" aria-label="New asset, or one they have" data-hw-existing>
<option value="0">New asset</option>
<?php foreach ([$asset_type => $same_type, 'Their other assets' => $other_type] as $group_label => $group) {
if (!$group) {
@@ -189,7 +189,7 @@ ob_start();
<div class="col-md col-sm-6">
<div class="input-group input-group-sm">
<span class="input-group-text" title="Assigned to"><i class="fas fa-fw fa-user"></i></span>
<select class="form-select" name="<?= $field ?>[contact]" aria-label="Assigned to" data-hw-new>
<select class="form-select select2" name="<?= $field ?>[contact]" aria-label="Assigned to" data-hw-new>
<option value="0">- Nobody -</option>
<?php foreach ($contacts as $contact_id => $contact_name) { ?>
<option value="<?= $contact_id ?>"><?= escapeHtml($contact_name) ?></option>

View File

@@ -37,7 +37,7 @@ ob_start();
<label class="form-label">How was it sent? <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-paper-plane"></i></span>
<select class="form-select" name="sent_method" required>
<select class="form-select select2" name="sent_method" required>
<?php foreach (getSentMethods() as $sent_method) { ?>
<option value="<?= escapeHtml($sent_method) ?>"><?= escapeHtml($sent_method) ?></option>
<?php } ?>

View File

@@ -38,7 +38,7 @@ ob_start();
<label class="form-label">Billed <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sync-alt"></i></span>
<select class="form-select" name="frequency" required>
<select class="form-select select2" name="frequency" required>
<?php foreach (recurringInvoiceFrequencies() as $frequency => $label) { ?>
<option value="<?= $frequency ?>"><?= $label ?> - first on <?= escapeHtml(recurringInvoiceStep($doc['invoice_date'], $frequency)) ?></option>
<?php } ?>

View File

@@ -62,7 +62,7 @@ ob_start();
<label class="form-label">Card <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-credit-card"></i></span>
<select class="form-select" name="saved_payment_id" required>
<select class="form-select select2" name="saved_payment_id" required>
<?php foreach ($cards as $card) { ?>
<option value="<?= intval($card['saved_payment_id']) ?>"><?= escapeHtml($card['saved_payment_description']) ?> (<?= escapeHtml($card['payment_provider_name']) ?>)</option>
<?php } ?>

View File

@@ -87,7 +87,7 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-balance-scale"></i></span>
<select class="form-select" name="tax">
<select class="form-select select2" name="tax">
<?= taxOptionsHtml($form_taxes, $form_tax_id) ?>
</select>
</div>
@@ -118,7 +118,7 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<label class="form-label">Billed</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="frequency" data-product-frequency>
<select class="form-select select2" name="frequency" data-product-frequency>
<?php foreach (quoteFrequencies() as $frequency_value => $frequency_label) { ?>
<option value="<?= $frequency_value ?>" <?= $form_frequency === $frequency_value ? 'selected' : '' ?>><?= $frequency_label ?></option>
<?php } ?>
@@ -129,7 +129,7 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<label class="form-label">Counted</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-users"></i></span>
<select class="form-select" name="seat_source">
<select class="form-select select2" name="seat_source">
<?php foreach (productSeatSources() as $seat_value => $seat_label) { ?>
<option value="<?= $seat_value ?>" <?= $form_seat === $seat_value ? 'selected' : '' ?>><?= $seat_label ?></option>
<?php } ?>

View File

@@ -141,7 +141,7 @@ ob_start();
<label class="form-label">Why</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-question-circle"></i></span>
<select class="form-select" name="reason">
<select class="form-select select2" name="reason">
<?php foreach (productWriteOffReasons() as $reason) { ?>
<option><?= escapeHtml($reason) ?></option>
<?php } ?>

View File

@@ -50,7 +50,7 @@ ob_start();
<label class="form-label">Ship to</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-map-marker-alt"></i></span>
<select class="form-select" name="ship_to" data-ship-to>
<select class="form-select select2" name="ship_to" data-ship-to>
<?php foreach (officesAll() as $office_id => $office) { ?>
<option value="<?= intval($office_id) ?>" <?= !$other && intval($po['po_ship_to_office_id']) === intval($office_id) ? 'selected' : '' ?>><?= escapeHtml($office['name'] . (officeAddressLine($office) !== '' ? ' - ' . officeAddressLine($office, ', ') : '')) ?></option>
<?php } ?>

View File

@@ -34,7 +34,7 @@ ob_start();
<label class="form-label">Carrier</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-truck"></i></span>
<select class="form-select" name="carrier">
<select class="form-select select2" name="carrier">
<?php foreach (PO_CARRIERS as $key => [$label]) { ?>
<option value="<?= $key ?>"><?= escapeHtml($label) ?></option>
<?php } ?>

View File

@@ -37,7 +37,7 @@ ob_start();
<label class="form-label">How was it sent? <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-paper-plane"></i></span>
<select class="form-select" name="sent_method" required>
<select class="form-select select2" name="sent_method" required>
<?php foreach (getSentMethods() as $sent_method) { ?>
<option value="<?= escapeHtml($sent_method) ?>"><?= escapeHtml($sent_method) ?></option>
<?php } ?>

View File

@@ -100,7 +100,7 @@ ob_start();
<label class="form-label">Bill it on</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="recurring[<?= $frequency ?>][to]" data-quote-recurring-to>
<select class="form-select select2" name="recurring[<?= $frequency ?>][to]" data-quote-recurring-to>
<option value="0">A new recurring invoice, billed <?= strtolower($frequencies[$frequency]) ?></option>
<?php foreach ($options as $recurring_id => $option) { ?>
<option value="<?= $recurring_id ?>">Add to <?= escapeHtml(billingNumber('recurring', $option)) ?><?= trim((string) $option['recurring_invoice_scope']) !== '' ? ' - ' . escapeHtml($option['recurring_invoice_scope']) : '' ?> (<?= $money($option['recurring_invoice_amount']) ?> a <?= $period ?>)</option>
@@ -119,7 +119,7 @@ ob_start();
<label class="form-label">Its invoices</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-paper-plane"></i></span>
<select class="form-select" name="recurring[<?= $frequency ?>][auto_send]">
<select class="form-select select2" name="recurring[<?= $frequency ?>][auto_send]">
<option value="1">Emailed as they are made</option>
<option value="0">Left as drafts to check</option>
</select>

View File

@@ -61,7 +61,7 @@ isset($mysqli) || die("Direct file access is not allowed");
<label class="form-label">Unit numbering</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-sort-numeric-down"></i></span>
<select class="form-select" name="units_descending">
<select class="form-select select2" name="units_descending">
<option value="0" <?php if (!$rack_units_descending) { echo "selected"; } ?>>U1 at the bottom (standard)</option>
<option value="1" <?php if ($rack_units_descending) { echo "selected"; } ?>>U1 at the top</option>
</select>

View File

@@ -111,7 +111,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
<label class="form-label">How often <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sync-alt"></i></span>
<select class="form-select" name="frequency" required data-recurring-frequency>
<select class="form-select select2" name="frequency" required data-recurring-frequency>
<?php foreach (recurringInvoiceFrequencies() as $key => $label) { ?>
<option value="<?= $key ?>" <?= $form_frequency === $key ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
@@ -170,7 +170,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
<label class="form-label small mb-1">For them</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-file-invoice-dollar"></i></span>
<select class="form-select" name="billing" data-recurring-billing-mode>
<select class="form-select select2" name="billing" data-recurring-billing-mode>
<option value="" <?= $form_billing === '' ? 'selected' : '' ?>>Our cost - not billed on</option>
<option value="bill" <?= $form_billing === 'bill' ? 'selected' : '' ?>>Billed on to them each time</option>
<option value="covered" <?= $form_billing === 'covered' ? 'selected' : '' ?>>Covered by their recurring invoice</option>
@@ -188,7 +188,7 @@ while ($row = mysqli_fetch_assoc($sql)) {
<label class="form-label small mb-1">Recurring invoice</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-redo-alt"></i></span>
<select class="form-select" name="recurring_invoice_id" data-recurring-cover data-selected="<?= $form_covered_by ?>"></select>
<select class="form-select select2" name="recurring_invoice_id" data-recurring-cover data-selected="<?= $form_covered_by ?>"></select>
</div>
</div>
<div class="col-12 small text-body-secondary" data-recurring-billing-note></div>

View File

@@ -72,7 +72,7 @@ ob_start();
<label class="form-label">Billed <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-sync-alt"></i></span>
<select class="form-select" name="frequency" required>
<select class="form-select select2" name="frequency" required>
<?php foreach (recurringInvoiceFrequencies() as $frequency => $label) { ?>
<option value="<?= $frequency ?>" <?= $one && $one['recurring_invoice_frequency'] === $frequency ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>

View File

@@ -195,7 +195,7 @@ ob_start();
<label class="form-label" for="<?= $uid ?>Expires">Works for</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-clock"></i></span>
<select class="form-select" id="<?= $uid ?>Expires" name="expires">
<select class="form-select select2" id="<?= $uid ?>Expires" name="expires">
<?php foreach (shareExpiryOptions() as $hours => $label) { ?>
<option value="<?= $hours ?>" <?= $hours === $defaults['expires'] ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>
@@ -207,7 +207,7 @@ ob_start();
<label class="form-label" for="<?= $uid ?>Views">Can be opened</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-eye"></i></span>
<select class="form-select" id="<?= $uid ?>Views" name="views">
<select class="form-select select2" id="<?= $uid ?>Views" name="views">
<?php foreach (shareViewOptions() as $views => $label) { ?>
<option value="<?= $views ?>" <?= $views === $defaults['views'] ? 'selected' : '' ?>><?= $label ?></option>
<?php } ?>

View File

@@ -302,12 +302,12 @@ ob_start();
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-calendar-day"></i></span>
<input type="datetime-local" class="form-control" name="schedule" min="<?= date('Y-m-d\TH:i') ?>" value="<?= escapeHtml($prefill_schedule) ?>" aria-label="Date and time of the work">
<select class="form-select flex-grow-0 w-auto" name="schedule_minutes" aria-label="How long">
<select class="form-select select2 flex-grow-0 w-auto" name="schedule_minutes" aria-label="How long">
<?php foreach (ticketScheduleLengths($prefill_schedule_minutes) as $minutes => $label) { ?>
<option value="<?= intval($minutes) ?>" <?= intval($minutes) === $prefill_schedule_minutes ? 'selected' : '' ?>><?= escapeHtml($label) ?></option>
<?php } ?>
</select>
<select class="form-select flex-grow-0 w-auto" name="onsite" aria-label="Visit">
<select class="form-select select2 flex-grow-0 w-auto" name="onsite" aria-label="Visit">
<option value="0">Remote</option>
<option value="1">Onsite</option>
</select>

View File

@@ -77,7 +77,7 @@ ob_start();
<label>Visit</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select" name="onsite" required>
<select class="form-select select2" name="onsite" required>
<option value="0" <?php if ($ticket_onsite == 0) echo "selected"; ?>>Remote</option>
<option value="1" <?php if ($ticket_onsite == 1) echo "selected"; ?>>Onsite</option>
</select>

View File

@@ -115,7 +115,7 @@ ob_start();
<label class="form-label">Invoice</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-file-invoice"></i></span>
<select class="form-select" name="invoice_id" data-ticket-invoice-target>
<select class="form-select select2" name="invoice_id" data-ticket-invoice-target>
<option value="0">A new draft invoice</option>
<?php foreach ($drafts as $draft_id => $draft) { ?>
<option value="<?= $draft_id ?>">Add to <?= escapeHtml(billingNumber('invoice', $draft)) ?><?= trim((string) $draft['invoice_scope']) !== '' ? ' - ' . escapeHtml($draft['invoice_scope']) : '' ?> (<?= escapeHtml(billingMoney($draft['invoice_amount'], $currency)) ?>)</option>
@@ -134,7 +134,7 @@ ob_start();
<label class="form-label">Category <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-tag"></i></span>
<select class="form-select" name="category" required>
<select class="form-select select2" name="category" required>
<option value="">- Category -</option>
<?= categoryOptionsHtml('Income') ?>
</select>
@@ -193,7 +193,7 @@ ob_start();
<label class="form-label">Tax</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-percent"></i></span>
<select class="form-select" name="tax_id" data-ticket-invoice-tax>
<select class="form-select select2" name="tax_id" data-ticket-invoice-tax>
<?= taxOptionsHtml($taxes, taxDefaultFor($client_id, 'time')) ?>
</select>
</div>

View File

@@ -42,7 +42,7 @@ ob_start();
<label>Approval comes from <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-layer-group"></i></span>
<select class="form-select" name="approval_scope" id="approval_scope" required>
<select class="form-select select2" name="approval_scope" id="approval_scope" required>
<option value="">- Pick one -</option>
<option value="internal">Our team</option>
<option value="client">The client</option>
@@ -55,7 +55,7 @@ ob_start();
<label>Who can approve? <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-user-check"></i></span>
<select class="form-select" name="approval_type" id="approval_type" required>
<select class="form-select select2" name="approval_type" id="approval_type" required>
<!-- JS -->
</select>
</div>

View File

@@ -62,12 +62,12 @@ ob_start();
<?php } ?>
</select>
<?php } elseif ($field === 'vehicle') { ?>
<select class="form-select" name="value">
<select class="form-select select2" name="value">
<option value="1">Their own vehicle - paid back for the distance</option>
<option value="0">A company vehicle</option>
</select>
<?php } elseif ($field === 'billable') { ?>
<select class="form-select" name="value">
<select class="form-select select2" name="value">
<option value="1">Bill the client for them</option>
<option value="0">Not billed - our cost</option>
</select>

View File

@@ -142,7 +142,7 @@ $unit = tripUnit();
<label class="form-label">For the ticket</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-life-ring"></i></span>
<select class="form-select" name="ticket_id" data-trip-ticket data-selected="<?= $form_ticket ?>">
<select class="form-select select2" name="ticket_id" data-trip-ticket data-selected="<?= $form_ticket ?>">
<option value="0">- No ticket -</option>
</select>
</div>
@@ -165,7 +165,7 @@ $unit = tripUnit();
<label class="form-label">Their site</label>
<div class="input-group">
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
<select class="form-select" name="location_id" data-trip-site data-selected="<?= $form_location ?>">
<select class="form-select select2" name="location_id" data-trip-site data-selected="<?= $form_location ?>">
<option value="0">- Somewhere else -</option>
</select>
</div>

View File

@@ -296,6 +296,15 @@
this.queued = false;
var wrap = this.wrap = make('div', 'itflow-select' + (this.multiple ? ' is-multiple' : ''));
// How wide the <select> was set to be, so it sits as it did - beside a time in an input group, say
['w-auto', 'flex-grow-0', 'flex-shrink-0'].forEach(function (name) {
if (select.classList.contains(name)) {
wrap.classList.add(name);
}
});
if (select.style.maxWidth) {
wrap.style.maxWidth = select.style.maxWidth;
}
var control = this.control = make('div', 'itflow-select-control form-select');
control.setAttribute('role', 'combobox');
control.setAttribute('aria-haspopup', 'listbox');