Skip to content

Commit

Permalink
Dev: Show url description
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 19, 2018
1 parent 57f1d81 commit 2ad38e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1143,6 +1143,13 @@ private function moveSubmitIfNeeded()
$this->aSurveyInfo['surveyls_url'] = $this->processString($this->aSurveyInfo['surveyls_url']);
$this->aSurveyInfo['aCompleted']['sSurveylsUrl'] = $this->aSurveyInfo['surveyls_url'];

// TODO: Process string in url description?
if ($this->aSurveyInfo['surveyls_urldescription'] != "") {
$this->aSurveyInfo['aCompleted']['sSurveylsUrlDescription'] = $this->aSurveyInfo['surveyls_urldescription'];
} else {
$this->aSurveyInfo['aCompleted']['sSurveylsUrlDescription'] = $this->aSurveyInfo['surveyls_url'];
}


if (isset($this->aSurveyInfo['autoredirect']) && $this->aSurveyInfo['autoredirect'] == "Y" && $this->aSurveyInfo['surveyls_url']) {
//Automatically redirect the page to the "url" setting for the survey
Expand Down
2 changes: 1 addition & 1 deletion themes/survey/vanilla/views/subviews/content/submit.twig
Expand Up @@ -69,7 +69,7 @@
{{ aSurveyInfo.aCompleted.sPluginHTML }}

{# NOTE: not very clear what the old replacement keyword {URL} was doing #}
{{ aSurveyInfo.aCompleted.sSurveylsUrl }}
<a href="{{ aSurveyInfo.aCompleted.sSurveylsUrl }}">{{ aSurveyInfo.aCompleted.sSurveylsUrlDescription }}</a>
</div>
</div>
</form> <!-- main form -->

0 comments on commit 2ad38e8

Please sign in to comment.