Skip to content

Commit

Permalink
Merge pull request #392 from gabrieljenik/patch-24
Browse files Browse the repository at this point in the history
New Feature: Added ADMINNAME and ADMINEMAIL as replacement field for survey texts
  • Loading branch information
c-schmitz committed Dec 1, 2015
2 parents 9b21a0d + 63012db commit d81264b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/controllers/admin/limereplacementfields.php
Expand Up @@ -216,6 +216,8 @@ private function _getReplacementFields($fieldtype, $surveyid)
$replFields[] = array('TOKEN:' . strtoupper($attributefield), sprintf(gT("Token attribute: %s"), $attributedescription['description']));
}
$replFields[] = array('EXPIRY', gT("Survey expiration date"));
$replFields[] = array('ADMINNAME', gT("Name of the survey administrator"));
$replFields[] = array('ADMINEMAIL', gT("Email address of the survey administrator"));
return array($replFields, false);

case 'email-admin_notification':
Expand Down Expand Up @@ -337,4 +339,4 @@ private function _getReplacementFields($fieldtype, $surveyid)
}
}

}
}
2 changes: 2 additions & 0 deletions application/helpers/replacements_helper.php
Expand Up @@ -535,6 +535,8 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
$coreReplacements['DATESTAMP'] = $_datestamp;
$coreReplacements['ENDTEXT'] = $_endtext;
$coreReplacements['EXPIRY'] = $_dateoutput;
$coreReplacements['ADMINNAME'] = $thissurvey['admin'];
$coreReplacements['ADMINEMAIL'] = $thissurvey['adminemail'];
$coreReplacements['GID'] = Yii::app()->getConfig('gid','');// Use the gid of the question, except if we are not in question (Randomization group name)
$coreReplacements['GOOGLE_ANALYTICS_API_KEY'] = $_googleAnalyticsAPIKey;
$coreReplacements['GOOGLE_ANALYTICS_JAVASCRIPT'] = $_googleAnalyticsJavaScript;
Expand Down

0 comments on commit d81264b

Please sign in to comment.