Skip to content

Commit

Permalink
Dev Merge master to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 19, 2018
2 parents c0fa0d3 + c4ad32a commit 9ea5ce5
Show file tree
Hide file tree
Showing 22 changed files with 194 additions and 131 deletions.
2 changes: 2 additions & 0 deletions application/commands/WipeCommand.php
Expand Up @@ -38,6 +38,8 @@ public function run($sArgument)
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "truncate table {{surveys}}";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{surveys_groups}} where gsid<>1";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "truncate table {{surveys_languagesettings}}";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{permissions}} where uid<>1";
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/statistics.php
Expand Up @@ -467,7 +467,7 @@ public function run($surveyid = 0, $subaction = null)
$statisticsoutput .= $helper->generate_html_chartjs_statistics($surveyid, $summary, $summary, $usegraph, $outputType, 'DD', $statlang);
break;
case 'pdf':
$helper->generate_statistics($surveyid, $summary, $summary, $usegraph, $outputType, 'I', $statlang);
$helper->generate_statistics($surveyid, $summary, $summary, $usegraph, $outputType, 'D', $statlang);
exit;
break;
case 'xls':
Expand Down
7 changes: 4 additions & 3 deletions application/extensions/yii-jsoneditor/JsonEditor.php
Expand Up @@ -47,11 +47,12 @@ public function run()
{
$htmlOptions = $this->htmlOptions;
list($name, $id) = $this->resolveNameID();
echo CHtml::tag('div', $htmlOptions, CHtml::textArea($name, $this->value, array(
'id' => $id
echo CHtml::tag('div', $htmlOptions, CHtml::textArea($name, json_encode($this->value), array(
'id' => $id,
'encode' => false,
)));
$config = json_encode($this->editorOptions);
App()->getClientScript()->registerScript("initJsonEditor" . $id, "$('#{$id}').jsonEditor($config);", CClientScript::POS_READY);
}
}
?>
?>
5 changes: 4 additions & 1 deletion application/models/TemplateManifest.php
Expand Up @@ -856,7 +856,10 @@ protected function setThisTemplate()
$packageActionFromEngineSection = json_decode(json_encode($this->config->engine->packages));
if (!empty($packageActionFromEngineSection)) {
if (!empty($packageActionFromEngineSection->add)) {
$this->packages = array_merge($packageActionFromEngineSection->add, $this->packages);
$this->packages = array_merge(
!is_array($packageActionFromEngineSection->add) ? [$packageActionFromEngineSection->add] : $packageActionFromEngineSection->add,
$this->packages
);
}
if (!empty($packageActionFromEngineSection->remove)) {
$this->packages = array_diff($this->packages, $packageActionFromEngineSection->remove);
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/participants/importCSV_view.php
Expand Up @@ -101,7 +101,7 @@
<div class='panel-body'>

<p>
<?php eT("File should be a standard CSV (comma delimited) file with optional double quotes around values (default for OpenOffice and Excel). The first line must contain the field names. The fields can be in any order."); ?>
<?php eT("File should be a standard CSV (comma delimited) file with optional double quotes around values (default for most spreadsheet tools). The first line must contain the field names. The fields can be in any order."); ?>
</p>
<span style="font-weight:bold;"><?php eT("Mandatory field:") ?></span> email <br/>
<span style="font-weight:bold;"><?php eT("Optional fields:") ?></span> firstname, lastname,blacklisted,language
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/csvupload.php
Expand Up @@ -128,7 +128,7 @@
<div class="alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong><?php eT("CSV input format"); ?></strong><br/>
<p><?php eT("File should be a standard CSV (comma delimited) file with optional double quotes around values (default for OpenOffice and Excel). The first line must contain the field names. The fields can be in any order."); ?></p>
<p><?php eT("File should be a standard CSV (comma delimited) file with optional double quotes around values (default for most spreadsheet tools). The first line must contain the field names. The fields can be in any order."); ?></p>
<span style="font-weight:bold;"><?php eT("Mandatory fields:"); ?></span> firstname, lastname, email<br />
<span style="font-weight:bold;"><?php eT('Optional fields:'); ?></span> emailstatus, token, language, validfrom, validuntil, attribute_1, attribute_2, attribute_3, usesleft, ... .
</div>
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/tokenform.php
Expand Up @@ -277,7 +277,7 @@
</div>
</div>
</div>
<input class='form-control hidden YesNoDateHidden' type='text' size='20' id='sent' name='sent' value="<?php if (isset($sentDBValue)) {echo $sentDBValue; } else {echo " N "; }?>" />
<input class='form-control hidden YesNoDateHidden' type='text' size='20' id='sent' name='sent' value="<?php if (isset($sent)) {echo $sent; } else {echo " N "; }?>" />
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -323,7 +323,7 @@
</div>
</div>
</div>
<input class='form-control hidden YesNoDateHidden' type='text' size='20' id='remindersent' name='remindersent' value="<?php if (isset($remindersentDBValue)) {echo $remindersentDBValue; } else {echo " N "; }?>" />
<input class='form-control hidden YesNoDateHidden' type='text' size='20' id='remindersent' name='remindersent' value="<?php if (isset($remindersent)) {echo $remindersent; } else {echo " N "; }?>" />
</div>

<!-- Reminder count, Uses left -->
Expand Down
6 changes: 0 additions & 6 deletions assets/scripts/deactivatedebug.js

This file was deleted.

26 changes: 26 additions & 0 deletions docs/release_notes.txt
Expand Up @@ -35,6 +35,32 @@ Thank you to everyone who helped with this new release!
CHANGE LOG
------------------------------------------------------


Changes from 3.15.0 (build 181008) to 3.15.1 (build 181017) to October 17, 2018
-Fixed issue #13928: script (and tag) are not filtered or encoded if question is in same group (Denis Chenu)
-Fixed issue #14061: Duplication check when adding participant to survey not working (#1119) (Thomas Singer)
-Fixed issue #14122: Missing translation for question type labels/dialog/buttons (Carsten Schmitz)
-Fixed issue #14133: lss with long group name broke when import (#1138) (Denis Chenu)
-Fixed issue #14142: Integer values in pdf report in multiple numerical input (Denis Chenu)
-Fixed issue #14146: Graphs in pdf not correctly displayed (Dominik Vitt)
-Fixed issue : Disable direct access to uploaded files (apache only) (Denis Chenu)
-Fixed issue: Statistics export as PDF opens the PDF in the current tab. It should create a download like the Excel export. (#982) (kw-pr)
-Fixed issue: Statistics show error 500 when exporting to Excel (Carsten Schmitz)
-Fixed issue: {SID} placeholder does not work in email templates (#1139) (Anton Victorson)
#Updated translation: Catalan by qualitatuvic
#Updated translation: Czech (Informal) by jelen1
#Updated translation: Czech by jelen1
#Updated translation: Dutch (Informal) by Han
#Updated translation: Dutch by Han
#Updated translation: German (Informal) by c_schmitz
#Updated translation: German by c_schmitz
#Updated translation: Hungarian by kkd
#Updated translation: Italian (Informal) by lfanfoni
#Updated translation: Italian by lfanfoni
#Updated translation: Polish (Informal) by elissa
#Updated translation: Polish by elissa
#Updated translation: Spanish (Spain) by c_schmitz, aesteban

Changes from 3.14.11 (build 180926) to 3.15.0 (build 181008) October 8, 2018
-New feature #14119: minute step for datetimepicker (Denis Chenu)
-New feature: Added Italian language to multilingual sample survey (Luciano Fanfoni) (Carsten Schmitz)
Expand Down
Expand Up @@ -12,16 +12,19 @@
<!-- answer -->
{{ sTimer }}

<div class="ls-answers answers-list row" role="radiogroup" aria-labelledby="ls-question-text-{{ name }}">
<div class="{{coreClass}} row " role="toolbar" aria-labelledby="ls-question-text-{{name}}">
<div class="list-unstyled form-inline btn-toolbar col-sm-12 " data-toggle="buttons" role="toolbar" aria-labelledby="ls-question-text-{{name }}">

{# rows/answer_row.php #}
{{ sRows }}

{# Value for expression manager javascript (use id) ; no need to submit #}
{{ C.Html.hiddenField("java"~name,value,({
'id' : "java"~name,
'disabled' : true,
}))
}}
{# Value for expression manager javascript (use id) ; no need to submit #}
{{ C.Html.hiddenField("java"~name,value,({
'id' : "java"~name,
'disabled' : true,
}))
}}
</div>
</div>
<div class="row {{ extraclass }} col-sm-4 hide" id="{{ name }}-div">
<label for="SOTH{{ name }}" class="control-label" id="label-id-{{ name }}">{{ othertext }}</label>
Expand Down
@@ -0,0 +1,11 @@
.bootstrap-item input {
visibility:hidden;
}

.bootstrap-item {
margin: 2px 2px;
}

.bootstrap-buttons-div {
padding: 0 2px;
}
Expand Up @@ -5,4 +5,3 @@
*
*/
#}
</ul>
Expand Up @@ -6,5 +6,3 @@
* @var $iColumnWidth
*/
#}
<!-- on small screen, each column is full widht, so it look like a single colunm-->
<ul class="list-unstyled form-inline btn-group col-sm-12" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{basename }}">
Expand Up @@ -25,7 +25,7 @@
-->
<files>
<css>
<filename></filename>
<filename>scripts/bootstrapbuttons.css</filename>
</css>
<js>
<filename>scripts/bootstrapbuttons.js</filename>
Expand All @@ -49,9 +49,27 @@
</options>
<default>default</default>
<help>Change button size</help>
<caption>Button size:</caption>
<caption>Button size</caption>
<i18n>hr</i18n>
</attribute>
<attribute>
<name>max_buttons_row</name>
<category>Display theme options</category>
<sortorder>91</sortorder>
<inputtype>buttongroup</inputtype>
<options>
<default>Default</default>
<col-sm-12>1</col-sm-12>
<col-sm-6>2</col-sm-6>
<col-sm-4>3</col-sm-4>
<col-sm-3>4</col-sm-3>
<col-sm-2>6</col-sm-2>
<col-sm-1>12</col-sm-1>
</options>
<default></default>
<help>Choose maximum number of buttons in a row</help>
<caption>Maximum number of buttons in a row</caption>
</attribute>
</custom_attributes>

<!-- Here datas about how LimeSurvey should load the core js/css of the question -->
Expand Down
Expand Up @@ -10,26 +10,22 @@
*/
#}

{% set button_size=question_template_attribute.button_size %}

{% if button_size == 'default' or button_size == '' %}
{% set button_size_class='' %}
{% else %}
{% set button_size_class= "btn-"~button_size %}
{% endif %}
{% set button_size_class = (question_template_attribute.button_size == 'default' or question_template_attribute.button_size is empty) ? '' : "btn-"~question_template_attribute.button_size %}
{% set max_buttons_row = (question_template_attribute.max_buttons_row == 'default' or question_template_attribute.max_buttons_row is empty) ? 'col-sm-2' : question_template_attribute.max_buttons_row %}

<!-- answer_row -->
<li id="javatbd{{ myfname }}" class="button-item btn btn-primary {{ button_size_class }} {% if checkedState!='' %} active {% endif %}">
<input
class="radio bootstrap-radio"
type="radio"
name="{{ name }}"
id="answer{{ name }}{{ code }}"
value={{ code }}
{{ checkedState }}
/>
<label for="answer{{ name }}">
<span class="" aria-hidden="true"></span> {{ answer }}
</label>
</li>
<div class="bootstrap-buttons-div col-xs-12 {{ max_buttons_row }}">
<div id="javatbd{{ myfname }}" class="bootstrap-item btn btn-primary {{ button_size_class }} {% if checkedState!='' %} active {% endif %} col-xs-12 col-sm-12">
<input
class="radio bootstrap-radio"
type="radio"
name="{{ name }}"
id="answer{{ name }}{{ code }}"
value={{ code }}
{{ checkedState }}
/>
<label for="answer{{ name }}"> {{ answer }}
</label>
</div>
</div>
<!-- end of answer_row -->
Expand Up @@ -8,26 +8,23 @@
*/
#}

{% set button_size=question_template_attribute.button_size %}

{% if button_size == 'default' %}
{% set button_size_class='' %}
{% else %}
{% set button_size_class= "btn-"~button_size %}
{% endif %}
{% set button_size_class = (question_template_attribute.button_size == 'default' or question_template_attribute.button_size is empty) ? '' : "btn-"~question_template_attribute.button_size %}
{% set max_buttons_row = (question_template_attribute.max_buttons_row == 'default' or question_template_attribute.max_buttons_row is empty) ? 'col-sm-2' : question_template_attribute.max_buttons_row %}

<!-- answer_row_noanswer -->
<li id="javatbd{{ name }}F" class="button-item btn btn-primary {{ button_size_class }} {% if check_ans!='' %} active {% endif %}">
<input
class="radio bootstrap-radio"
type="radio"
name="{{ name }}"
id="answer{{ name }}"
value="{{ code }}"
{{ check_ans }}
/>
<label for="answer{{ name }}">
<span class="" aria-hidden="true"></span> {{ gT('No answer') }}
</label>
</li>
<div class="bootstrap-buttons-div col-xs-12 {{ max_buttons_row }}">
<div id="javatbd{{ name }}F" class="bootstrap-item btn btn-primary {{ button_size_class }} {% if check_ans!='' %} active {% endif %} col-xs-12 col-sm-12">
<input
class="radio bootstrap-radio"
type="radio"
name="{{ name }}"
id="answer{{ name }}"
value="{{ code }}"
{{ check_ans }}
/>
<label for="answer{{ name }}">
<span class="" aria-hidden="true"></span> {{ gT('No answer') }}
</label>
</div>
</div>
<!-- endof answer_row_noanswer -->
Expand Up @@ -16,29 +16,26 @@
*/
#}

{% set button_size=question_template_attribute.button_size %}

{% if button_size == 'default' %}
{% set button_size_class='' %}
{% else %}
{% set button_size_class= "btn-"~button_size %}
{% endif %}
{% set button_size_class = (question_template_attribute.button_size == 'default' or question_template_attribute.button_size is empty) ? '' : "btn-"~question_template_attribute.button_size %}
{% set max_buttons_row = (question_template_attribute.max_buttons_row == 'default' or question_template_attribute.max_buttons_row is empty) ? 'col-sm-2' : question_template_attribute.max_buttons_row %}

<!-- answer_row_other -->
<!-- Checkbox + label -->
<li id="javatbd{{ name }}F" class="button-item btn btn-primary {{ button_size_class }} {% if checkedState!='' %} active focus {% endif %}" {{ sDisplayStyle }}>
<input
class="radio bootstrap-radio"
type="radio"
value="-oth-"
name="{{ name }}"
id="SOTH{{ name }}"
{{ checkedState }}
/>
<label for="answer{{ name }}">
<span class="" aria-hidden="true"></span> {{ gT('Other') }}
</label>
</li>
<input type="hidden" class="bootstrap-radio-value" {{ answer_other }} name="answer{{ name }}othervalue" data-name="{{ name }}" id="answer{{ name }}othervalue">
<div class="bootstrap-buttons-div col-xs-12 {{ max_buttons_row }}">
<div id="javatbd{{ name }}F" class="bootstrap-item btn btn-primary {{ button_size_class }} {% if checkedState!='' %} active focus {% endif %} col-xs-12 col-sm-12" {{ sDisplayStyle }}>
<input
class="radio bootstrap-radio"
type="radio"
value="-oth-"
name="{{ name }}"
id="SOTH{{ name }}"
{{ checkedState }}
/>
<label for="answer{{ name }}">
<span class="" aria-hidden="true"></span> {{ gT('Other') }}
</label>
</div>
<input type="hidden" class="bootstrap-radio-value" {{ answer_other }} name="answer{{ name }}othervalue" data-name="{{ name }}" id="answer{{ name }}othervalue">
</div>
<!-- end of answer_row_other -->

Expand Up @@ -12,20 +12,19 @@

<!-- answer -->

{% set button_size_class = (question_template_attribute.button_size == 'default' or question_template_attribute.button_size is empty) ? '' : "btn-"~question_template_attribute.button_size %}
{% set max_buttons_row = (question_template_attribute.max_buttons_row == 'default' or question_template_attribute.max_buttons_row is empty) ? 'col-sm-2' : question_template_attribute.max_buttons_row %}

<input type="hidden" name="MULTI{{name}}" value="{{anscount}}" />
<div class="{{coreClass}} row" role="group" aria-labelledby="ls-question-text-{{basename}}">
<ul class="list-unstyled form-inline btn-group col-sm-12" data-toggle="buttons" role="radiogroup" aria-labelledby="ls-question-text-{{basename }}">
<div class="{{coreClass}} row " role="toolbar" aria-labelledby="ls-question-text-{{basename}}">
<div class="list-unstyled form-inline btn-toolbar col-sm-12 " data-toggle="buttons" role="toolbar" aria-labelledby="ls-question-text-{{basename }}">
{% for aRow in aRows %}
{% if loop.index0 is divisible by(iMaxRowsByColumn) and loop.index0 != 0 %}
</ul>
<ul class="list-unstyled col-xs-12 col-sm-{{iColumnWidth}}">
{% endif %}
{% set aRow = aRow|merge({'button_size': question_template_attribute.button_size}) %}
{% set aRow = aRow|merge({'button_size_class': button_size_class})|merge({'max_buttons_row': max_buttons_row}) %}
{% set rowTemplate = aRow.other ? './survey/questions/answer/multiplechoice/rows/answer_row_other.twig' : './survey/questions/answer/multiplechoice/rows/answer_row.twig' %}
{% include rowTemplate with aRow only %}

{% endfor %}
</ul>
</div>

</div>
<!-- comment -->
Expand Down
@@ -1,3 +1,11 @@
.checkbox-item label::before, .checkbox-item label::after {
.bootstrap-item label::before, .bootstrap-item label::after {
display: none !important;
}
}

.bootstrap-item {
margin: 2px 2px;
}

.bootstrap-buttons-div {
padding: 0 2px;
}

0 comments on commit 9ea5ce5

Please sign in to comment.