Navigation Menu

Skip to content

Commit

Permalink
Fixed issue #14101: Missing CSS-class "form-horizontal" for multiple-…
Browse files Browse the repository at this point in the history
…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 f598914
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 101 deletions.
Expand Up @@ -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}}"
Expand Down
42 changes: 22 additions & 20 deletions application/views/survey/questions/answer/date/dropdown/answer.twig
Expand Up @@ -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 -->
Expand Up @@ -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">
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -11,7 +11,7 @@
#}

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

Expand Down
37 changes: 19 additions & 18 deletions application/views/survey/questions/answer/date/selector/answer.twig
Expand Up @@ -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'>
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand All @@ -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 }}"
Expand Down
39 changes: 20 additions & 19 deletions application/views/survey/questions/answer/language/answer.twig
Expand Up @@ -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(){
Expand Down
41 changes: 21 additions & 20 deletions application/views/survey/questions/answer/list_dropdown/answer.twig
Expand Up @@ -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 -->
Expand Up @@ -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 }}"
Expand Down
Expand Up @@ -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 }}"
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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 }}"
Expand Down
Expand Up @@ -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">
Expand Down
Expand Up @@ -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">
Expand All @@ -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'
Expand Down
Expand Up @@ -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 %}
Expand Down
Expand Up @@ -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 -->
Expand Up @@ -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
Expand Down

0 comments on commit f598914

Please sign in to comment.