Skip to content

Commit

Permalink
Dev: moved classes, id and attribute to core for required.twig
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Aug 18, 2017
1 parent 7491ac7 commit 72547e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1748,6 +1748,10 @@ private function setClassAndIds()
$this->aSurveyInfo['class']['activealert'] = ' alert alert-warning alert-dismissible fade in alert-dismissible ';
$this->aSurveyInfo['class']['errorHtml'] = ' fade in alert-dismissible ls-questions-have-errors alert alert-danger ';

// required
$this->aSurveyInfo['class']['required'] = 'text-danger asterisk fa fa-asterisk pull-left small';
$this->aSurveyInfo['class']['requiredspan'] = 'sr-only text-danger asterisk';
$this->aSurveyInfo['attr']['required'] = 'aria-hidden="true"';

}

Expand Down
3 changes: 2 additions & 1 deletion templates/default/views/subviews/required.twig
@@ -1 +1,2 @@
<small class="text-danger asterisk fa fa-asterisk pull-left small" aria-hidden='true'></small><span class="sr-only text-danger asterisk"> ({{ gT("Mandatory")}})<span>
<small class="{{ aSurveyInfo.class.required }}" {{ aSurveyInfo.attr.required }} ></small>
<span class="{{ aSurveyInfo.class.requiredspan }}"> ({{ gT("Mandatory")}})<span>

0 comments on commit 72547e0

Please sign in to comment.