From 5cff5e1e900bb6ff437238fa39388389b85b97b0 Mon Sep 17 00:00:00 2001 From: tyrant88 Date: Thu, 8 Dec 2016 13:34:10 +0100 Subject: [PATCH] Added an error message parameter to the yform field --- CHANGELOG.md | 5 +++++ lib/yform/action/cr_recipient.php | 5 +++-- package.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf84788..29b30ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +Version 1.1.4 – 08.12.2016 +-------------------------- + +* Added an error message parameter to the yform field + Version 1.1.3 – 08.12.2016 -------------------------- diff --git a/lib/yform/action/cr_recipient.php b/lib/yform/action/cr_recipient.php index 93852e4..6a61f57 100644 --- a/lib/yform/action/cr_recipient.php +++ b/lib/yform/action/cr_recipient.php @@ -77,7 +77,7 @@ function executeAction() //$errormsg = rex_i18n::msg('lus_cleverreach_api_success'); } else { $error = true; - if ($result->message != '') { $errormsg .= ': '. $result->message; } + if ( $result->message != '' ) { $errormsg .= ': '. $result->message; } } } elseif (!empty($email) && !$error) { $error == true; @@ -85,6 +85,7 @@ function executeAction() } if ( $error == true ) { + if ( $this->getElement(5) != '' ) { $errormsg = $this->getElement(5); } $this->params['form_show'] = true; $this->params['hasWarnings'] = true; $this->params['warning_messages'][] = $errormsg; @@ -98,7 +99,7 @@ function executeAction() function getDescription() { - return 'cr_recipient -> Beispiel: action|cr_recipient|emailfield|0/1/actionfield|anrede,titel,vorname,nachname,firma'; + return 'cr_recipient -> Beispiel: action|cr_recipient|emailfield|0/1/actionfield|anrede,titel,vorname,nachname,firma|errormsg'; } } diff --git a/package.yml b/package.yml index d84a5e3..c2b2a4a 100644 --- a/package.yml +++ b/package.yml @@ -1,7 +1,7 @@ # Alle hier gesetzten Werte können über $addon->getProperty($key) abgefragt werden package: lus_cleverreach # Pflichtfeld -version: '1.1.3' # Pflichtfeld +version: '1.1.4' # Pflichtfeld author: Laut und Schoen supportpage: https://github.com/tyrant88/lus_cleverreach