Fixed missing form_nonce for JS when using FlexForm

This commit is contained in:
Matias Griese
2019-02-14 10:06:24 +02:00
parent b2df60647d
commit 94610f4e61
3 changed files with 13 additions and 0 deletions

View File

@@ -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

View File

@@ -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.
*

View File

@@ -85,6 +85,11 @@ trait FormTrait
return 'form';
}
public function getNonce(): string
{
return Utils::getNonce($this->getNonceAction());
}
public function getAction(): string
{
return '';