- remove from the table footer some elements created by datatables.
These elements are automatically created to allow table sorting, but the
footer here is used as an interface to add new reverser servers. We
don't need them. Also, the elements will interfere with the placeholder
text (added using CSS, but only to completely empty cells).
- adjust CSS `.actions` class to force right aligned text on the footer.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- Bootstrap 5 also removed `.form-group` (row bottom margin) and `.help-block`
(muted helper text); both are used across the settings and query-log forms,
so restore them. This recovers the vertical spacing that was missing between
form rows throughout the interface.
- Dark theme: mute the active pagination link and the filled `.card-info` /
`.card-primary` card headers (e.g. the query-log "Advanced filtering" box),
which used Bootstrap's over-bright `#0d6efd`/`#0dcaf0` on the dark background.
The headers are recoloured via AdminLTE 4's `--lte-card-variant-*` variables.
- Widen the reverse-DNS servers table's "Enabled" column so its header no
longer overflows into the next column.
Signed-off-by: DL6ER <dl6er@dl6er.de>
Convert all 35 static checkbox/radio inputs across 9 templates (queries,
search, settings-api, settings-dhcp, groups-domains, settings-dns,
settings-privacy, settings-teleporter) plus the dynamically-generated
ones (settings-advanced.js's per-setting boolean/enum controls,
settings-dns.js's DNS-upstream picker) from icheck-bootstrap's
JS-post-processed styling to Bootstrap 5's native .form-check/
.form-check-input/.form-check-label markup, which needs no JS at all.
Remove footer.js's applyCheckboxRadioStyle() (and its call sites in
settings-advanced.js/settings-dns.js) entirely - it used to strip and
re-add classes on every checkbox/radio's parent after page load, which
would have destroyed the new static .form-check classes at runtime.
Drop the icheck-bootstrap dependency, its vendor CSS and the <link> in
header.lp, and replace its now-dead pseudo-element checkbox styling in
pi-hole.css with a couple of plain .form-check-input/.form-check-label
rules for the one spot that needs a smaller checkbox size (the domain
list's filter-by-type row).
Two "no-icheck"-excluded checkboxes (a table-header select-all in both
settings-dns.lp and settings-dns.js) are left as bare native checkboxes,
matching their original deliberate exclusion.
Also confirmed pi-hole's own text-red/text-green/bg-*/etc. color utility
classes are unaffected by the AdminLTE core removal - each theme file
already defines them fully rather than only overriding an AdminLTE base,
so no fix was needed there.
Verified against a live container: settings/dns (checkbox/radio styling,
custom-servers card-collapse toggle) and settings/privacy (privacy-level
radios) render correctly with zero console errors.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
FTL's DoT/DoH client work (pi-hole/FTL#2940) pins tls:// and https://
URIs onto the well-known resolver list, but the picker only rendered
checkboxes for the plain addresses.
- Plain / DoT / DoH tabs, one checkbox per address family per tab
- DoT/DoH tabs omit vendors with no pinned URI for that protocol,
instead of showing empty rows
- keeps the table narrow as more protocols (DoQ, DoH3, ...) get added
- each tab shows a label with how many upstreams are selected there,
positioned top-right with a tooltip, per rdwebdesign's review
comments
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <github@promofaux.dev>
The "Add" button has the same `.saveRevServers` CSS class as the other
normal "Save" buttons. This is fine and simplifies the code, as all rows
(including the last one) use the same validation pattern and functions.
The only difference is the `addRevServer` function, used to save the new
values.
Preceding the selector with `tbody`, makes sure only the normal "Save"
buttons will use the `saveRecord()` function.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- add a placeholder using CSS
- use a javascript to trim undesired spaces. This command also removes the
"hidden" line break automatically added by browsers when the content of
an editable element is cleared/deleted.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- remove `<input>` tags and add contenteditable attribute to all
editable cells
- rows are always enabled now (no "edit" button to enable them)
- Simplify javascript code:
- use classNames to simplify column selection, instead of unique ids
- use datatables "columnDefs" and "createdCell" to add attributes
- use CSS class "editing" and CSS rules to handle buttons
- remove unused and unnecessary attributes from elements
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Previously, the same function was used to initialize the table and update
the table rows, when lines were added, edited or deleted.
Now, one function initializes the table and another function saves the
changes, shows a message and updates the table to reflect the changes.
The values are "saved and applied" immediately using an AJAX call.
The waitMe overlay is also shown, but the page is NOT reloaded.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- add functions and buttons to add, modify, undo changes and delete lines
- generate the table using data already on the textarea
- add functions to read textarea contents and parse then into an array
- add functions to update the textarea contents from the table
- hide the textarea. Only the table will be visible
- make sure the table is not shown when the option was set by ENV VARS
- move some help paragraphs to the table legend
- remove usused original help text for the textarea
- use fixed size for all action buttons
- don't use "icheck" styling on the checkboxes in the table
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>