Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: Converted php into twig for language question type
- Loading branch information
1 parent
dfc1754
commit 7d66321
Showing
3 changed files
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
application/views/survey/questions/answer/language/answer.php
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
application/views/survey/questions/answer/language/answer.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{# | ||
/** | ||
* Language HTML | ||
* @var $name | ||
* @var $checkconditionFunction | ||
* @var $answerlangs | ||
* @var $sLang | ||
*/ | ||
#} | ||
<!-- Language --> | ||
|
||
<!-- answer --> | ||
<div class="{{ coreClass }} form-group form-inline"> | ||
<label for='answer{{ name }}' class='sr-only control-label'> | ||
{{ gT('Choose your language') }} | ||
</label> | ||
|
||
<select | ||
name="{{ name }}" | ||
id="answer{{ name }}" | ||
class="languagesurvey form-control" | ||
aria-describedby="ls-question-text-{{ name }}" | ||
> | ||
{% for ansrow in answerlangs %} | ||
<option value="{{ ansrow }}" {% if sLang == ansrow %} SELECTED {% endif %}> | ||
{% set aLanguage=getLanguageNameFromCode(ansrow, true) %} | ||
{{ aLanguage[1] }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
<input type="hidden" name="java{{ name }}" id="java{{ name }}" value="{{ sLang }}" /> | ||
</div> | ||
|
||
<script type='text/javascript'> | ||
/*<![CDATA[*/ | ||
$('#answer{{ name }}').change(function(){ | ||
$('<input type="hidden">').attr('name','lang').val($(this).val()).appendTo($('form#limesurvey')); | ||
}); | ||
/*]]>*/ | ||
</script> | ||
<!-- end of answer --> |