chomenko / confirm
Installs: 580
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:extensions
Requires
- php: >=7
- chomenko/extra-form: ^3.0
- chomenko/modal: ^3.0
- doctrine/annotations: ^1.6
- kdyby/events: ^3.1
This package is auto-updated.
Last update: 2024-10-15 18:41:29 UTC
README
Confirm modal from Nette Framework
Required
Install
composer require chomenko/confirm
- Configure kdyby/events
- Configure chomenko/extra-form
- Configure chomenko/modal
And then you should enable the extension using your neon config.
extensions: Confirm: Chomenko\Confirm\DI\ConfirmExtension #optionally Confirm: translator: Chomenko\Translator\Translator
Usage
Use annotation @Confirm
in control:
<?php //Your Presenter or Component use Chomenko\Confirm\Confirm; /** * @Confirm( * question="You really want to delete this user?", * type=Confirm::TYPE_DANGER * ) * * @param int $userId * @throws \Nette\Application\AbortException */ public function handleRemoveUser(int $userId) { //.... }
in latte:
<a n:href="RemoveUser!, userId => 1">Remove user</a>
Confirm options