i-lateral/silverstripe-admin-toggle-checkbox

CSS only toggle that re-styles all checkboxes in the admin

Installs: 921

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 5

Forks: 0

Open Issues: 10

Language:JavaScript

Type:silverstripe-vendormodule

1.1.0 2022-01-27 20:47 UTC

README

Simple module that re-styles all checkboxes in the admin as Toggle fields (thanks to https://www.w3schools.com/howto/howto_css_switch.asp for the base CSS to make this work)

NOTE: As SilverStripe 4 uses react to generate checkboxes, as of 1.1.* this module utilises a JavaScript mutator to detect changes to the DOM and then restructure checkbox elements based in order to style them (rather than utilising templates).

Example

Install

Install using composer: composer require i-lateral/silverstripe-admin-toggle-checkbox

Usage

Just install the module and flush the cache. All Checkbox fields in the CMS will be automatically re-styled