Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Sep 15, 2016
2 parents c441251 + bd4dbc3 commit 8e4502d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v2.0.4
## 09/15/2016

1. [](#improved)
* Allow filling the page header form dynamically (e.g. use case: Comments plugin)

# v2.0.3
## 09/12/2016

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Form
version: 2.0.3
version: 2.0.4
description: Enables the forms handling
icon: check-square
author:
Expand Down
5 changes: 5 additions & 0 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ public function onPageProcessed(Event $e)
}

$header = $page->header();

//call event to allow filling the page header form dynamically (e.g. use case: Comments plugin)
$event = $this->grav->fireEvent('onFormPageHeaderProcessed', new Event(['header' => $header]));
$header = $event->header;

if ((isset($header->forms) && is_array($header->forms)) ||
(isset($header->form) && is_array($header->form))) {

Expand Down

0 comments on commit 8e4502d

Please sign in to comment.