Skip to content

Commit

Permalink
Added an error message parameter to the yform field
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrant88 committed Dec 8, 2016
1 parent 2084194 commit 5cff5e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
--------------------------

Expand Down
5 changes: 3 additions & 2 deletions lib/yform/action/cr_recipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ 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;
$errormsg = rex_i18n::msg('lus_cleverreach_config_failure');
}

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;
Expand All @@ -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';
}

}
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 5cff5e1

Please sign in to comment.