Commit d9d789d1 authored by Chenu Denis's avatar Chenu Denis

[fix] Privacy message don't need js

parent ee6ad66a
......@@ -16,12 +16,12 @@
<supportUrl>https://extensions.sondages.pro/themes-and-templates/skelvanilla-a11y-and-usuability/</supportUrl>
<copyright>Copyright (C) 2018-2019 Denis Chenu / Sondages Pro</copyright>
<license>GNU General Public License version 3 or later</license>
<version>9.2.0</version>
<version>9.2.1</version>
<apiVersion>3</apiVersion>
<description><![CDATA[<strong>LimeSurvey Bootstrap Vanilla Survey Theme with Accessibility and Options</strong><br>Base on vanilla theme, usage of more aria, fix some role and aria from core.<br>Allow usage of a lot of variations, list of variation can be updated. Some decoration option using boostrap class.]]></description>
<extends>vanilla</extends>
<last_update>2020-06-26 13:58:32</last_update>
<lastUpdate>2020-06-26 13:58:32</lastUpdate>
<last_update>2020-06-26 16:53:58</last_update>
<lastUpdate>020-06-26 16:53:58</lastUpdate>
</metadata>
<files>
......@@ -337,6 +337,9 @@
<file type="view" role="subview">./subviews/messages/warnings.twig</file>
<file type="view" role="subview">./subviews/messages/no_js_alert.twig</file>
<file type="view" role="subview">./subviews/privacy/privacy.twig</file>
<file type="view" role="subview">./subviews/privacy/privacy_modal.twig</file>
<file type="view" role="subview">./subviews/privacy/privacy_text.twig</file>
<file type="view" role="subview">./subviews/content/allinone_welcome.twig</file>
<file type="view" role="subview">./subviews/navigation/language_changer.twig</file>
<file type="view" role="subview">./subviews/footer/footer.twig</file>
<file type="css">./css/bootstrap.css</file>
......
......@@ -364,3 +364,5 @@ p.return-to-survey{
/* Textarea functionnality : force resize and max-with */
.answer-item textarea{resize: both;max-width:100%;}
.textarea-no-max-width .answer-item textarea{max-width:none}
.no-js .collapse{display: block;}
.no-js .fade{opacity: 1;}
......@@ -65,7 +65,7 @@
{# hideprivacyinfo #}
<div class='col-sm-12 col-md-6 col-lg-3'>
<div class='form-group row'>
<label for='simple_edit_options_hideprivacyinfo' class='control-label col-xs-4'>{{ gT("Hide privacy info") }}</label>
<label for='simple_edit_options_hideprivacyinfo' class='control-label col-xs-4'>{{ gT("Hide anonymity information") }}</label>
<div class='col-xs-8'>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
......
......@@ -190,22 +190,10 @@ var ThemeScripts = function(){
}
hideEmptyPart();
};
var initWelcomePage = function(){
if($('#datasecurity_accepted').length >0) {
$('#ls-button-submit').prop('disabled', true);
$('#datasecurity_accepted').on('change', function(){
$('#ls-button-submit').prop('disabled', !$(this).prop('checked'));
});
}
};
return {
init: init,
initUserForms: initUserForms,
initGlobal: initGlobal,
initWelcomePage: initWelcomePage,
focusFirst: focusFirst,
sliderSuffixClone : sliderSuffixClone,
hideQuestionWithRelevanceSubQuestion : window.templateCore.hideQuestionWithRelevanceSubQuestion,
......
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Test Welcome / Privacy for All in one mode ·._.·´¯)·._.·´¯)
This file is only a piece of logic, it doesn't show nothing. We use it to hide complexity in layout.twig
When survey is in All In One mode, if welcome or privacy message are activated, they must be shown on the page.
#}
{% if aSurveyInfo.format == 'A' %}
{% if not aSurveyInfo.showwelcome is defined or not aSurveyInfo.showwelcome != 'N' %}
{{ include('./subviews/messages/welcome.twig') }}
{% endif %}
{{ include('./subviews/privacy/privacy.twig') }}
{% endif %}
......@@ -30,7 +30,7 @@
{{ include('./subviews/messages/no_js_alert.twig') }}
{# If survey mode is "All in One", it will add the welcome/privacy messages if needed #}
{{ include('./subviews/privacy/allinone_mode_welcome_privacy.twig') }}
{{ include('./subviews/content/allinone_welcome.twig') }}
{#
PRESENT THE QUESTION GROUPS
......
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· No JavaScript Alert ·._.·´¯)·._.·´¯)
If JavaScript is not enabled, this alert will appear on the screen.
#}
<!-- No JavaScript alert -->
<div class='{{ aSurveyInfo.class.nojs }} alert alert-danger ' {{ aSurveyInfo.attr.nojs }} data-type='checkjavascript'>
{{
gT("Caution: JavaScript execution is disabled in your browser or for this website. You may not be able to answer all questions in this survey. Please, verify your browser parameters.")
}}
</div>
......@@ -20,7 +20,6 @@
#}
<!-- Welcome Message -->
<div id="{{ aSurveyInfo.id.welcomecontainer | trim }}" class="{{ aSurveyInfo.class.welcomecontainer }}" {{ aSurveyInfo.attr.welcomecontainer }}>
......
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Privacy ·._.·´¯)·._.·´¯)
Show the privacy message (in All in One Mode)
see: allinone_mode_welcome_privacy.twig
#}
{% if (aSurveyInfo.options.hideprivacyinfo == "off" ) %}
{% block anonymous %}
{% if (aSurveyInfo.anonymized == "Y") %}
<div class="well well-sm">
<div class="{{ aSurveyInfo.class.privacyhead }} h4 text-primary " {{ aSurveyInfo.attr.privacyhead }}>
{{ gT("This survey is anonymous.") }}
</div>
<div>
<p class="{{ aSurveyInfo.class.privacybody }}" {{ aSurveyInfo.attr.privacybody }}>
{{
gT("The record of your survey responses does not contain any identifying information about you, unless a specific survey question explicitly asked for it.")
}}
</p>
<p class="{{ aSurveyInfo.class.privacybody }}">
{{
gT("If you used an identifying token to access this survey, please rest assured that this token will not be stored together with your responses. It is managed in a separate database and will only be updated to indicate whether you did (or did not) complete this survey. There is no way of matching identification tokens with survey responses.")
}}
</p>
</div>
</div>
{% endif %}
{% endblock %}
{% endif %}
{% block datasecurity %}
{% if (aSurveyInfo.showsurveypolicynotice == 1) %}
{{include('./subviews/privacy/privacy_text.twig')}}
{% elseif (aSurveyInfo.showsurveypolicynotice == 2) %}
{{include( './subviews/privacy/privacy_modal.twig')}}
{% endif %}
{% endblock %}
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Privacy with modal ·._.·´¯)·._.·´¯)
Show the privacy message and the data security message will be available in a modal
#}
<!-- Privacy message -->
<div class="row">
<div class="col-sm-12">
<label for="datasecurity_accepted" class="control-label {{ aSurveyInfo.class.privacydataseccheckboxlabel }}">{{ aSurveyInfo.datasecurity_notice_label }}</label>
<input required class="{{ aSurveyInfo.class.privacydataseccheckbox }}" type="checkbox" name="datasecurity_accepted" id="datasecurity_accepted" />
</div>
</div>
<div class="collapse fade" id="data-security-modal-{{aSurveyInfo.sid}}">
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="modal-title">{{gT('Survey data policy')}}</h4>
</div>
<div class="panel-body {{ aSurveyInfo.class.privacydatasecmodalbody }}">
{{ aSurveyInfo.datasecurity_notice }}
</div>
<div class="ls-no-js-hidden panel-footer">
<button type="button" class="btn btn-primary" onclick="$('#datasecurity_accepted').prop('checked',true).trigger('change');" data-dismiss="modal">{{gT("Accept")}}</button>
<button type="button" class="btn btn-default" onclick="$('#data-security-modal-{{aSurveyInfo.sid}}').collapse('hide');">{{gT("Close")}}</button>
</div>
</div>
</div>
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· Privacy with modal ·._.·´¯)·._.·´¯)
Show the privacy message and the data security message will be available in a modal
#}
<!-- Privacy message -->
<div class="row">
<div class="limit-text-window {{ aSurveyInfo.class.privacydatasectextbody }}">
{{ aSurveyInfo.datasecurity_notice }}
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label for="datasecurity_accepted" class="control-label {{ aSurveyInfo.class.privacydataseccheckboxlabel }}">{{ aSurveyInfo.datasecurity_notice_label }}</label>
&nbsp;<input required class="{{ aSurveyInfo.class.privacydataseccheckbox }}" type="checkbox" name="datasecurity_accepted" id="datasecurity_accepted" />
</div>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment