Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
[FIX] This resolves issue #17 and improves the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Jun 8, 2018
1 parent 05473f7 commit 46dc339
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [mediawesome](https://packagist.org/packages/nglasl/silverstripe-mediawesome)

_The current release is **4.0.1**_
_The current release is **4.0.2**_

> This module allows creation of dynamic media holders/pages with CMS customisable types and attributes (blogs, events, news, publications), including versioning.
Expand Down Expand Up @@ -91,7 +91,7 @@ Customisation of media types and their respective attributes will be restricted.

A media holder request may have optional date, category and tag filters, which are extendable by developers.

Retrieve the date filter form in the media holder template:
The following on the media holder template allows a user to select a date, and then see media pages for and prior to that date:

```php
$DateFilterForm
Expand Down
10 changes: 5 additions & 5 deletions src/controllers/MediaHolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,20 +428,20 @@ public function getDateFilterForm() {
);
$form->setFormMethod('get');

// Display existing request filters.

$request = $this->getRequest();
$form->loadDataFrom($request->getVars());

// Remove validation if clear has been triggered.

$request = $this->getRequest();
if($request->getVar('action_clearFilters')) {
$form->unsetValidator();
}

// Allow extension customisation.

$this->extend('updateFilterForm', $form);

// Display existing request filters.

$form->loadDataFrom($request->getVars());
return $form;
}

Expand Down

0 comments on commit 46dc339

Please sign in to comment.