- Forced form's name when one is given to a contact (will make sure the good form has been passed)

This commit is contained in:
Dave Mc Nicoll 2020-04-09 14:39:25 -04:00
parent 23e8eb71f6
commit db17c890c5
2 changed files with 3 additions and 3 deletions

View File

@ -346,7 +346,7 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable {
public function jsonSerialize() { public function jsonSerialize() {
return [ return [
'tag' => $this->tag, 'tag' => $this->tag,
'attr' => $this->attr, 'attr' => $this->attributes,
'childs' => $this->childs, 'childs' => $this->childs,
'options' => $this->options, 'options' => $this->options,
]; ];
@ -404,7 +404,7 @@ class UiElement implements \ArrayAccess, \Iterator, \JsonSerializable {
return ! in_array(key($this->childs), [ NULL, FALSE ], true); return ! in_array(key($this->childs), [ NULL, FALSE ], true);
} }
public static function is_node($obj) : bool public static function isNode($obj) : bool
{ {
return $obj instanceof UiElement; return $obj instanceof UiElement;
} }

View File

@ -34,7 +34,7 @@ class FormHandler {
{ {
if ( false !== $this->context->formSent = $this->sent ) { if ( false !== $this->context->formSent = $this->sent ) {
if ( $this->context->formName ?? false ) { if ( $this->context->formName ?? false ) {
$this->context->formSent = (bool) ( $this->request->getParsedBody()['picea-ui-form'][$this->context->formName] ?? false ); $this->sent = $this->context->formSent = (bool) ( $this->request->getParsedBody()['picea-ui-form'][$this->context->formName] ?? false );
} }
} }
} }