Permalink
Browse files

Fixed issue #14101: Missing CSS-class "form-horizontal" for multiple-…

…short-text-questions

Fixed issue #14191: Broken question view if sum of width !=12
  • Loading branch information...
Shnoulle committed Oct 29, 2018
1 parent 378db43 commit f5989145c39678d1d46da279ea9825bc3ba3fd5d
Showing with 106 additions and 101 deletions.
  1. +1 −1 application/views/survey/questions/answer/5pointchoice/rows/item_row.twig
  2. +22 −20 application/views/survey/questions/answer/date/dropdown/answer.twig
  3. +1 −1 application/views/survey/questions/answer/date/dropdown/rows/day.twig
  4. +1 −1 application/views/survey/questions/answer/date/dropdown/rows/hour.twig
  5. +1 −1 application/views/survey/questions/answer/date/dropdown/rows/minute.twig
  6. +1 −1 application/views/survey/questions/answer/date/dropdown/rows/month.twig
  7. +1 −1 application/views/survey/questions/answer/date/dropdown/rows/year.twig
  8. +19 −18 application/views/survey/questions/answer/date/selector/answer.twig
  9. +1 −1 application/views/survey/questions/answer/gender/buttons/answer.twig
  10. +3 −3 application/views/survey/questions/answer/gender/radio/answer.twig
  11. +20 −19 application/views/survey/questions/answer/language/answer.twig
  12. +21 −20 application/views/survey/questions/answer/list_dropdown/answer.twig
  13. +1 −1 application/views/survey/questions/answer/list_with_comment/list/rows/answer_row.twig
  14. +1 −1 application/views/survey/questions/answer/listradio/rows/answer_row.twig
  15. +1 −1 application/views/survey/questions/answer/listradio/rows/answer_row_other.twig
  16. +1 −1 application/views/survey/questions/answer/multiplechoice/rows/answer_row.twig
  17. +1 −1 application/views/survey/questions/answer/multiplechoice/rows/answer_row_other.twig
  18. +2 −2 application/views/survey/questions/answer/multiplechoice_with_comments/rows/answer_row.twig
  19. +1 −1 application/views/survey/questions/answer/multiplenumeric/answer.twig
  20. +1 −1 application/views/survey/questions/answer/multipleshorttext/answer.twig
  21. +1 −1 application/views/survey/questions/answer/yesno/buttons/item.twig
  22. +4 −4 application/views/survey/questions/answer/yesno/radio/item.twig
@@ -13,7 +13,7 @@
#}

<!-- item_row -->
<li id="javatbd{{name}}{{value}}" class="form-group answer-item radio-item {{itemExtraClass}}">
<li id="javatbd{{name}}{{value}}" class="answer-item radio-item {{itemExtraClass}}">
<input
type="radio"
name="{{name}}"
@@ -15,26 +15,28 @@
<!-- Date, dropdown layout -->

<!-- answer -->
<div class="{{coreClass}} ls-no-js-hidden form-group form-inline" role="group" aria-labelledby="ls-question-text-{{name}}">
{# // rows/*.php #}
{{sRows}}
</div>
<!-- answer fo nojs action and real value sent -->
<div class='{{coreClass}} ls-js-hidden form-group form-inline'>
<label for='answer{{name}}' class='sr-only control-label'>
{{ sprintf(gT('Date in the format: %s'), dateformatdetails) }}
</label>
<div id="answer{{name}}_datetimepicker" class="input-group answer-item date-timepicker-group" data-basename="{{name}}"><!-- data-basename used in js function -->
{{ C.Html.textField(name,dateoutput,{
'id' : "answer" ~ name,
'class' : "form-control date-control date",
'aria-describedby' : "ls-question-text-" ~ name,
}) }}
<div class='form-inline'>
<div class="{{coreClass}} ls-no-js-hidden form-group" role="group" aria-labelledby="ls-question-text-{{name}}">
{# // rows/*.php #}
{{sRows}}
</div>
<!-- answer fo nojs action and real value sent -->
<div class='{{coreClass}} ls-js-hidden form-group'>
<label for='answer{{name}}' class='sr-only control-label'>
{{ sprintf(gT('Date in the format: %s'), dateformatdetails) }}
</label>
<div id="answer{{name}}_datetimepicker" class="input-group answer-item date-timepicker-group" data-basename="{{name}}"><!-- data-basename used in js function -->
{{ C.Html.textField(name,dateoutput,{
'id' : "answer" ~ name,
'class' : "form-control date-control date",
'aria-describedby' : "ls-question-text-" ~ name,
}) }}
</div>
<p class="tip help-block">
{{ sprintf(gT('Format: %s'),dateformatdetails) }}
</p>
</div>
<p class="tip help-block">
{{ sprintf(gT('Format: %s'),dateformatdetails) }}
</p>
</div>

<input type="hidden" id="dateformat{{name}}" value="{{dateformatdetails}}"/>
<input type="hidden" id="dateformat{{name}}" value="{{dateformatdetails}}"/>
</div>
<!-- end of answer -->
@@ -7,7 +7,7 @@
#}

<!-- day -->
<label for="day{{ dayId }}" class="sr-only">
<label for="day{{ dayId }}" class="sr-only control-label">
{{ gT('Day') }}
</label>
<select id="day{{dayId}}" name="day{{dayId}}" class="form-control day">
@@ -7,7 +7,7 @@
*/
#}
<!-- hour -->
<label for="hour{{ hourId }}" class="sr-only">
<label for="hour{{ hourId }}" class="sr-only control-label">
{{ gT('Hour') }}
</label>
<select id="hour{{ hourId }}" name="hour{{ hourId }}" class="hour form-control">
@@ -9,7 +9,7 @@
#}

<!-- minute -->
<label for="minute{{ minuteId }}" class="sr-only">
<label for="minute{{ minuteId }}" class="sr-only control-label">
{{ gT('Minute') }}
</label>
<select id="minute{{ minuteId }}" name="minute{{ minuteId }}" class="minute form-control">
@@ -8,7 +8,7 @@
#}

<!-- month -->
<label for="month{{ monthId }}" class="sr-only">
<label for="month{{ monthId }}" class="sr-only control-label">
{{ gT('Month') }}
</label>
<select id="month{{ monthId }}" name="month{{ monthId }}" class="month form-control">
@@ -11,7 +11,7 @@
#}

<!-- year -->
<label for="year{{ yearId }}" class="sr-only">
<label for="year{{ yearId }}" class="sr-only control-label">
{{ gT('Year') }}
</label>

@@ -19,26 +19,27 @@
<!-- Date, selector layout -->

<!-- answer -->
<div class='{{coreClass}} form-group form-inline'>
<label for='answer{{name}}' class='sr-only control-label'>
{{ sprintf(gT('Date in the format: %s'), dateformatdetails) }}
</label>
<div id="answer{{name}}_datetimepicker" class="input-group answer-item date-timepicker-group" data-basename="{{name}}"><!-- data-basename used in js function -->
{{ C.Html.textField(name,dateoutput,{
'id' : "answer" ~ name,
'class' : "form-control date-control date",
'aria-describedby' : "ls-question-text-" ~ name,
}) }}
<div class="input-group-addon btn btn-primary">
<i class="fa fa-calendar" aria-hidden="true"></i><span class="sr-only"> {{ gT("Open the date time chooser") }}</span>
<div class='form-inline'>
<div class='{{coreClass}} form-group'>
<label for='answer{{name}}' class='sr-only control-label'>
{{ sprintf(gT('Date in the format: %s'), dateformatdetails) }}
</label>
<div id="answer{{name}}_datetimepicker" class="input-group answer-item date-timepicker-group" data-basename="{{name}}"><!-- data-basename used in js function -->
{{ C.Html.textField(name,dateoutput,{
'id' : "answer" ~ name,
'class' : "form-control date-control date",
'aria-describedby' : "ls-question-text-" ~ name,
}) }}
<div class="input-group-addon btn btn-primary">
<i class="fa fa-calendar" aria-hidden="true"></i><span class="sr-only"> {{ gT("Open the date time chooser") }}</span>
</div>
</div>
{% if(hidetip) %}
<p class="tip help-block">
{{ sprintf(gT('Format: %s'),dateformatdetails) }}
</p>
{% endif %}
</div>
{% if(hidetip) %}
<p class="tip help-block">
{{ sprintf(gT('Format: %s'),dateformatdetails) }}
</p>
{% endif %}

</div>

<div class='hidden' style='display:none'>
@@ -13,7 +13,7 @@

<!--Gender question, buttons display -->
<!-- answer -->
<ul class="{{ coreClass }} list-unstyled form-inline btn-group btn-group-justified" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{basename }}">
<ul class="{{ coreClass }} list-unstyled btn-group btn-group-justified" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{basename }}">
<!-- Female -->
<li id="javatbd{{ name }}F" class="button-item btn btn-primary {% if fChecked!='' %} active {% endif %}">
<input
@@ -16,7 +16,7 @@
<!-- answer -->
<ul class="{{ coreClass }} list-unstyled form-inline" role="radiogroup" aria-labelledby="ls-question-text-{{ basename }}" >
<!-- Female -->
<li id='javatbd{{ name }}F' class="form-group answer-item radio-item">
<li id='javatbd{{ name }}F' class="answer-item radio-item">
<input
type="radio"
name="{{ name }}"
@@ -30,7 +30,7 @@
</li>

<!-- Male -->
<li id='javatbd{{ name }}M' class="form-group answer-item radio-item">
<li id='javatbd{{ name }}M' class="answer-item radio-item">
<input
type="radio"
name="{{ name }}"
@@ -46,7 +46,7 @@

<!-- No answer -->
{% if noAnswer %}
<li id='javatbd{{ name }}' class="form-group answer-item radio-item noanswer-item">
<li id='javatbd{{ name }}' class="answer-item radio-item noanswer-item">
<input
type="radio"
name="{{ name }}"
@@ -10,27 +10,28 @@
<!-- Language -->

<!-- answer -->
<div class="{{ coreClass }} form-group form-inline">
<label for='answer{{ name }}' class='sr-only control-label'>
{{ gT('Choose your language') }}
</label>
<div class='form-inline'>
<div class="{{ coreClass }} form-group">
<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 }}" />
<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>
</div>

<script type='text/javascript'>
/*<![CDATA[*/
$('#answer{{ name }}').change(function(){
@@ -16,26 +16,27 @@
<!-- List Dropdown -->

<!-- answer-->
<div class="form-inline">
<div class="{{ coreClass }} form-group">
<select
class="form-control list-question-select"
name="{{ name }}"
id="answer{{ name }}"
{% if dropdownSize %} size={{ dropdownSize }} {% endif %}
aria-labelledby="ls-question-text-{{ basename }}"
>
{# rows/option.php #}
{{ sOptions }}
</select>
{# rows/othertext.php #}
{{ sOther }}

<div class="{{ coreClass }} form-group form-inline">
<select
class="form-control list-question-select"
name="{{ name }}"
id="answer{{ name }}"
{% if dropdownSize %} size={{ dropdownSize }} {% endif %}
aria-labelledby="ls-question-text-{{ basename }}"
>
{# rows/option.php #}
{{ sOptions }}
</select>
{# rows/othertext.php #}
{{ sOther }}

{# Value for expression manager javascript (use id) ; no need to submit #}
{{ C.Html.hiddenField("java"~name,value,({
'id' : "java"~name,
'disabled' : "disabled",
}))
}}
{# Value for expression manager javascript (use id) ; no need to submit #}
{{ C.Html.hiddenField("java"~name,value,({
'id' : "java"~name,
'disabled' : "disabled",
}))
}}
</div>
</div>
<!-- end of answer -->
@@ -12,7 +12,7 @@
*/
#}
<!-- answer_row -->
<li id='javatbd{{ name }}{{ value }}' class="form-group {{ li_classes }}">
<li id='javatbd{{ name }}{{ value }}' class="{{ li_classes }}">
<input
type="radio"
name="{{ name }}"
@@ -11,7 +11,7 @@
#}

<!-- answer_row -->
<li id='javatbd{{ myfname }}' class='form-group answer-item radio-item' {{ sDisplayStyle }} >
<li id='javatbd{{ myfname }}' class='answer-item radio-item' {{ sDisplayStyle }} >
<input
type="radio"
value="{{ code }}"
@@ -17,7 +17,7 @@
#}

<!-- answer_row_other -->
<li id='javatbd{{ myfname }}' class='form-group answer-item radio-text-item form-inline' {{ sDisplayStyle }} >
<li id='javatbd{{ myfname }}' class='answer-item radio-text-item form-inline' role='group' {{ sDisplayStyle }} >
<!-- Checkbox + label -->
<div class="form-group othertext-label-checkox-container radio-item">
<input
@@ -19,7 +19,7 @@
*/
#}
<!-- answer_row -->
<li id='javatbd{{ myfname }}' class='question-item answer-item checkbox-item form-group {{ relevanceClass }}' >
<li id='javatbd{{ myfname }}' class='question-item answer-item checkbox-item {{ relevanceClass }}' >
<input
type="checkbox"
name="{{ myfname }}"
@@ -16,7 +16,7 @@
#}

<!-- answer_row_other -->
<li id='javatbd{{myfname}}' class='question-item answer-item checkbox-text-item form-group form-inline {{relevanceClass}}' >
<li id='javatbd{{myfname}}' class='question-item answer-item checkbox-text-item form-inline {{relevanceClass}}' >

<!-- Checkbox + label -->
<div class="form-group checkbox-item othertext-label-checkox-container">
@@ -24,7 +24,7 @@
*/
#}
<!-- answer_row -->
<li id="javatbd{{ name }}" class='row checkbox-text-item form-group'>
<li id="javatbd{{ name }}" class='row checkbox-text-item form-inline'>
<!-- Checkbox + label -->
<div class="col-sm-{{ sLabelWidth }} col-xs-12">
<div class="checkbox-item answer-item form-group">
@@ -49,7 +49,7 @@
</div>

<!-- Comment -->
<div class="col-sm-{{ sInputContainerWidth }} col-xs-12 answer-item text-item comment-item">
<div class="col-sm-{{ sInputContainerWidth }} col-xs-12 answer-item text-item comment-item form-group">
<input
class='form-control {{ kpclass }}'
type='text'
@@ -16,7 +16,7 @@

<!-- Multiple Numerical with slider -->
<!-- answer -->
<ul class='{{coreClass}} list-unstyled ' role="group" aria-labelledby="ls-question-text-{{basename}}">
<ul class='{{coreClass}} list-unstyled form-horizontal' role="group" aria-labelledby="ls-question-text-{{basename}}">
{% block rows %}
{{ sRows }}
{% endblock %}
@@ -9,7 +9,7 @@
<!-- Multiple Shor Text -->

<!-- answer -->
<ul class="{{ coreClass }} list-unstyled " role="group" aria-labelledby="ls-question-text-{{ basename }}">
<ul class="{{ coreClass }} list-unstyled form-horizontal" role="group" aria-labelledby="ls-question-text-{{ basename }}">
{{ sRows }}
</ul>
<!-- end of answer -->
@@ -10,7 +10,7 @@
* @var $value $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$name]
*/
#}
<ul class="{{ coreClass }} list-unstyled form-inline btn-group btn-group-justified" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{ basename }}">
<ul class="{{ coreClass }} list-unstyled btn-group btn-group-justified" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{ basename }}">
<!-- Yes -->
<li id="javatbd{{ name }}Y" class="button-item form-group btn btn-primary {% if yChecked %}active{% endif %}">
<input
Oops, something went wrong.

0 comments on commit f598914

Please sign in to comment.