Skip to content

Commit

Permalink
Release 2.1.0
Browse files Browse the repository at this point in the history
- Fix `AppendEventFilterDocumentation` delegate context
- Fetch filter documentation via AJAX
- Symphony 2.4.X - 2.6.X Compatibility
- Added MIT licence
  • Loading branch information
twiro committed Feb 24, 2017
1 parent 1e26a5c commit ccbd7bf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 14 deletions.
28 changes: 28 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
All source code included in the „Anti Spam Question“ Symphony Extension
archive is, unless otherwise specified, released under the MIT licence as
follows:

----- begin license block -----

Copyright 2008-2016 Mark Lewis, https://github.com/lewiswharf
Copyright 2017-20XX Roman Klein, https://github.com/twiro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

----- end license block -----
23 changes: 9 additions & 14 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public function fetchNavigation()
public function getSubscribedDelegates()
{
return array(
array(
'page' => '/blueprints/events/',
'delegate' => 'AppendEventFilterDocumentation',
'callback' => 'appendEventFilterDocumentation'
),
array(
'page' => '/blueprints/events/new/',
'delegate' => 'AppendEventFilter',
Expand All @@ -34,16 +39,6 @@ public function getSubscribedDelegates()
'delegate' => 'AppendEventFilter',
'callback' => 'appendEventFilter'
),
array(
'page' => '/blueprints/events/new/',
'delegate' => 'AppendEventFilterDocumentation',
'callback' => 'appendEventFilterDocumentation'
),
array(
'page' => '/blueprints/events/edit/',
'delegate' => 'AppendEventFilterDocumentation',
'callback' => 'appendEventFilterDocumentation'
),
array(
'page' => '/frontend/',
'delegate' => 'EventPreSaveFilter',
Expand Down Expand Up @@ -92,11 +87,11 @@ public function appendEventFilterDocumentation($context)
$context['documentation'][] = new XMLElement('h3', __('Anti Spam Question Filter'));
$context['documentation'][] = new XMLElement('p', __('To use the Anti Spam Question Filter, attach the Anti Spam Question Datasource on the pages that you use this event and add the following to your form:'));

$label = Widget::Label('<xsl:value-of select="//anti-spam-question/entry" />');
$label->appendChild(Widget::Input('anti-spam-question[answer]', NULL, 'text' ));
$label->appendChild(Widget::Input('anti-spam-question[id]', '{//anti-spam-question/entry/@id}', 'hidden' ));
$code = Widget::Label('<xsl:value-of select="//anti-spam-question/entry" />');
$code->appendChild(Widget::Input('anti-spam-question[answer]', NULL, 'text' ));
$code->appendChild(Widget::Input('anti-spam-question[id]', '{//anti-spam-question/entry/@id}', 'hidden' ));

$context['documentation'][] = contentBlueprintsEvents::processDocumentationCode($label);
$context['documentation'][] = contentAjaxEventDocumentation::processDocumentationCode($code);
}
}

Expand Down
6 changes: 6 additions & 0 deletions extension.meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
</author>
</authors>
<releases>
<release version="2.1.0" date="2017-02-24" min="2.4.0" max="2.6.x">
- Fix `AppendEventFilterDocumentation` delegate context
- Fetch filter documentation via AJAX
- Symphony 2.4.X - 2.6.X Compatibility
- Added MIT licence
</release>
<release version="2.0.0" date="2017-02-24" min="2.3.0" max="2.4.x">
- Renamed extension to "Anti Spam Question"
- Refactored extension and replaced event with datasource
Expand Down

0 comments on commit ccbd7bf

Please sign in to comment.