Skip to content

Commit

Permalink
[TASK] Finish powermail integration
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Aug 24, 2023
1 parent e6e4afc commit dec0cff
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Configuration/PageTsConfig/powermail.typoscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add FriendlyCaptcha field to Powermail
tx_powermail.flexForm.type.addFieldOptions {
friendlycaptcha = FriendlyCaptcha
}
friendlycaptcha = FriendlyCaptcha
}
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('powermail')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'friendlycaptcha_official',
'Configuration/TypoScript/Powermail/setup.typoscript',
'Configuration/TypoScript/Powermail',
'Friendly Captcha - EXT:powermail'
);
}
20 changes: 11 additions & 9 deletions Configuration/TypoScript/Powermail/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
plugin.tx_powermail {
view {
partialRootPaths {
0 = EXT:powermail/Resources/Private/Partials/
10 = EXT:friendlycaptcha_official/Resources/Private/Powermail/Partials
}
view {
partialRootPaths {
981818 = EXT:friendlycaptcha_official/Resources/Private/Powermail/Partials
}
}

settings.setup.validators {
1 {
class = StudioMitte\FriendlyCaptcha\FieldValidator\PowermailValidator
}
settings.setup.validators {
981818 {
class = StudioMitte\FriendlyCaptcha\FieldValidator\PowermailValidator
config {

}
}
}
}
Binary file removed Documentation/.DS_Store
Binary file not shown.
Binary file removed Documentation/Images/.DS_Store
Binary file not shown.
Binary file modified Documentation/Images/integration/powermail-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 66 additions & 2 deletions Documentation/Using/Powermail.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,69 @@
EXT:powermail
=============

.. note::
To be done
Friendly Captcha can be used in EXT:powermail by following these steps:

Setup
-----

TypoScript and Page TsConfig need to be extended.

Add TypoScript
~~~~~~~~~~~~~~

Either import the TypoScript manually in your site package or add the following line to your TypoScript template:

.. code-block:: typoscript
@import 'EXT:friendlycaptcha_official/Configuration/TypoScript/Powermail/setup.typoscript'
or select the TypoScript in your TypoScript record

.. figure:: /Images/integration/powermail-typoscript.png
:class: with-shadow
:alt: Add TypoScript
:width: 450px

Add TypoScript

Add Page TsConfig
~~~~~~~~~~~~~~~~~

Either import the TsConfig manually in your site package or add the following line to your TsConfig files :

.. code-block:: typoscript
@import 'EXT:friendlycaptcha_official/Configuration/PageTsConfig/powermail.typoscript'
or select the TypoScript in your TypoScript record

.. figure:: /Images/integration/powermail-page-tsconfig.png
:class: with-shadow
:alt: Add Page TsConfig
:width: 450px

Add Page TsConfig

Usage
-----

It is now possible to select Friendly Captcha as a field type in a powermail field record

.. figure:: /Images/integration/powermail-field.png
:class: with-shadow
:alt: Add Friendly Captcha to your form
:width: 450px

Add Friendly Captcha to your form

Result
------

The result should look like this:

.. figure:: /Images/integration/powermail-result.png
:class: with-shadow
:alt: Result
:width: 450px

Result

0 comments on commit dec0cff

Please sign in to comment.