maxime-rainville / silverstripe-copy-field
A field with a simple copy button
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 5
Language:JavaScript
Type:silverstripe-vendormodule
Requires
- maxime-rainville/silverstripe-react: ^0.0.0
- silverstripe/admin: ^1.0
- silverstripe/framework: ^4.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-11-14 16:02:36 UTC
README
This module provides a CopyField
for Silverstripe CMS. The CopyField
includes a copy button to make it easy to copy the value of the field to the clipboard.
Installation
composer require maxime-rainville/silverstripe-copy-field
Usage
The CopyField defaults to being read only. If you want to hide the value, you can use the setObfuscate
method on the CopyField
to get it to render as a password.
use MaximeRainville\CopyField\CopyField; ... $fields->addFieldsToTab( 'Root.Main', [ CopyField::create('APIKey', 'API Key', $this->Key), CopyField::create('APISecret', 'API Secret', $this->Secret)->setObfuscate(true) ] );