[TYPO3-dev] Powermail and SignalSlot isValid
Gianluca Strafella
gianluca.strafella at webformat.com
Tue Jun 25 15:24:27 CEST 2013
Thank you Alexander,
I've fixed my problem with first solution, overwriting template
FormError.html
Regards,
Gianluca
Il 25/06/2013 10:09, Alexander Bigga ha scritto:
> Dear Gianluca,
>
> Am 25.06.2013 09:41, schrieb Gianluca Strafella:
>
>> I use Powermail(version 2.0.4) and I have implemented a custom PHP
>> Validator using the SignalSlot "isValid" in
>> Tx_Powermail_Domain_Validator_CustomValidator.
>
> I tried this some time ago. By the way: you should update Powermail to
> 2.0.7! There is a security bugfix.
>
>> public function customIsValid($params, $obj) {
>> //(...)
>> $obj->isValid = false;
>> $obj->setError($msg, $fieldId);
>> }
>
> Correct. The setError() from powermail executes the extbase addError().
> Inside the fluid template, your message will be translated if the
> "$msg"-key exists in powermail.
>
> Have a look here:
>
> powermail/Classes/Domain/Validator/CustomValidator.php
> powermail/Resources/Private/Partials/FormError.html
>
> So you could take the Partials (and maybe all Templates and Layouts) to
> your fileadmin-directory and modify it for your needs.
>
> Or maybe it's also possible to overwrite / append the locallang.xml
> file? Here you find the language labels for the powermail validation
> errors:
>
> powermail/Resources/Private/Language/locallang.xml
>
>
> Maybe this helps you a step forward.
>
> Best regards,
>
> Alexander
--
Gianluca Strafella
Software Developer
gianluca.strafella at webformat.com
Tel. +39-0427-926.389
WEBFORMAT srl – www.webformat.com
Via S. Francesco d'Assisi, 6 – 20122 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)
More information about the TYPO3-dev
mailing list