mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 17:26:43 +02:00
Fixed missing form_nonce for JS when using FlexForm
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
* Fixed validation for select field type with selectize
|
||||
* Fixed `Flex[class]::getType()` to return the same value in every class
|
||||
* Fixed `FlexIndex` keys being lost when `FlexCollection` gets loaded
|
||||
* Fixed missing `form_nonce` for JS when using `FlexForm`
|
||||
|
||||
# v1.6.0-rc.2
|
||||
## 02/07/2019
|
||||
|
||||
@@ -76,6 +76,13 @@ interface FormInterface extends \Serializable
|
||||
*/
|
||||
public function getNonceAction(): string;
|
||||
|
||||
/**
|
||||
* Get the nonce value for a form
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNonce(): string;
|
||||
|
||||
/**
|
||||
* Get form action (URL). If action is empty, it points to the current page.
|
||||
*
|
||||
|
||||
@@ -85,6 +85,11 @@ trait FormTrait
|
||||
return 'form';
|
||||
}
|
||||
|
||||
public function getNonce(): string
|
||||
{
|
||||
return Utils::getNonce($this->getNonceAction());
|
||||
}
|
||||
|
||||
public function getAction(): string
|
||||
{
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user