Skip to content

Commit

Permalink
Dev Text fixes for privacy policy - unified naming
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Aug 30, 2022
1 parent ed273e9 commit b68f714
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 22 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -12,7 +12,7 @@
*/

$config['versionnumber'] = '5.4.0';
$config['dbversionnumber'] = 489;
$config['dbversionnumber'] = 490;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
Expand Down
6 changes: 3 additions & 3 deletions application/core/LsDefaultDataSets.php
Expand Up @@ -105,9 +105,9 @@ public static function getSurveyMenuEntryData()
null,
4,
'datasecurity',
gT('Data policy settings', 'unescaped'),
gT('Data policy settings', 'unescaped'),
gT('Edit data policy settings', 'unescaped'),
gT('Privacy policy settings', 'unescaped'),
gT('Privacy policy', 'unescaped'),
gT('Edit privacy policy settings', 'unescaped'),
'shield',
'fontawesome',
'',
Expand Down
6 changes: 3 additions & 3 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -9053,7 +9053,7 @@ public static function ShowSurveyLogicFile($sid, $gid = null, $qid = null, $LEMd
$errClass = 'danger';
$haveErrors = true;
}
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Survey data policy notice:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Privacy policy notice:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
}
if ($aSurveyInfo['surveyls_policy_error'] != '') {
$LEM->em->ResetErrorsAndWarnings();
Expand All @@ -9064,7 +9064,7 @@ public static function ShowSurveyLogicFile($sid, $gid = null, $qid = null, $LEMd
$errClass = 'danger';
$haveErrors = true;
}
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Survey data policy error:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Privacy policy error:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
}
if ($aSurveyInfo['surveyls_policy_notice_label'] != '') {
$LEM->em->ResetErrorsAndWarnings();
Expand All @@ -9075,7 +9075,7 @@ public static function ShowSurveyLogicFile($sid, $gid = null, $qid = null, $LEMd
$errClass = 'danger';
$haveErrors = true;
}
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Survey data policy label:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
$out .= "<tr class='LEMgroup'><td class='$errClass'>" . $LEM->gT("Privacy policy label:") . "</td><td colspan=\"3\">" . $sPrint . "</td></tr>";
}
}

Expand Down
17 changes: 17 additions & 0 deletions application/helpers/update/updates/Update_490.php
@@ -0,0 +1,17 @@
<?php

namespace LimeSurvey\Helpers\Update;

use LsDefaultDataSets;
use SurveymenuEntries;

class Update_490 extends DatabaseUpdateBase
{
/**
* This table is needed to collect failed emails.
*/
public function up()
{
$this->db->createCommand()->update("{{surveymenu_entries}}", ['title' => 'Privacy policy settings', 'menu_title' => 'Privacy policy', 'menu_description' => 'Edit privacy policy settings'], "name='datasecurity'");
}
}
Expand Up @@ -27,41 +27,41 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-lg-6">
<!-- Survey data policy checkbox label -->
<!-- Privacy policy checkbox label -->
<div class="form-group">
<label class="control-label"><?php eT("Survey data policy checkbox label:"); ?></label>
<label class="control-label"><?php eT("Privacy policy checkbox label:"); ?></label>
<div class="">
<?php echo CHtml::textField("dataseclabel_{$aSurveyLanguageSettings['surveyls_language']}",$aSurveyLanguageSettings['surveyls_policy_notice_label'],array('class'=>'form-control','size'=>"80",'id'=>"dataseclabel_{$aSurveyLanguageSettings['surveyls_language']}")); ?>
</div>
</div>
</div>
<div class="col-sm-12 col-lg-6">
<div class="well">
<?=gT('If you want to specify a link to the survey data policy, set "Show survey policy text with mandatory checkbox" to "Collapsible text" and use the placeholders {STARTPOLICYLINK} and {ENDPOLICYLINK} in the "Survey data policy checkbox label" field to define the link that opens the policy popup. If there is no placeholder given, there will be an appendix.')?>
<?=gT('If you want to specify a link to the privacy policy, set "Show privacy policy text with mandatory checkbox" to "Collapsible text" and use the placeholders {STARTPOLICYLINK} and {ENDPOLICYLINK} in the "Privacy policy checkbox label" field to define the link that opens the policy popup. If there is no placeholder given, there will be an appendix.')?>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-6">
<!-- Survey data policy message -->
<!-- Privacy policy message -->
<div class="form-group">
<label class=" control-label" for='datasec_<?php echo $aSurveyLanguageSettings['surveyls_language']; ?>'><?php eT("Survey data policy message:"); ?></label>
<label class=" control-label" for='datasec_<?php echo $aSurveyLanguageSettings['surveyls_language']; ?>'><?php eT("Privacy policy message:"); ?></label>
<div class="">
<div class="htmleditor input-group">
<?php echo CHtml::textArea("datasec_{$aSurveyLanguageSettings['surveyls_language']}",$aSurveyLanguageSettings['surveyls_policy_notice'],array('class'=>'form-control','cols'=>'80','rows'=>'20','id'=>"datasec_{$aSurveyLanguageSettings['surveyls_language']}")); ?>
<?php echo getEditor("survey-datasec","datasec_".$aSurveyLanguageSettings['surveyls_language'], "[".gT("Survey data policy:", "js")."](".$aSurveyLanguageSettings['surveyls_language'].")",$surveyid,'','',$action); ?>
<?php echo getEditor("survey-datasec","datasec_".$aSurveyLanguageSettings['surveyls_language'], "[".gT("Privacy policy:", "js")."](".$aSurveyLanguageSettings['surveyls_language'].")",$surveyid,'','',$action); ?>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-lg-6">
<!-- Survey data policy error message -->
<!-- Privacy policy error message -->
<div class="form-group">
<label class=" control-label" for='datasecerror_<?php echo $aSurveyLanguageSettings['surveyls_language']; ?>'><?php eT("Survey data policy error message:"); ?></label>
<label class=" control-label" for='datasecerror_<?php echo $aSurveyLanguageSettings['surveyls_language']; ?>'><?php eT("Privacy policy error message:"); ?></label>
<div class="">
<div class="htmleditor input-group">
<?php echo CHtml::textArea("datasecerror_{$aSurveyLanguageSettings['surveyls_language']}",$aSurveyLanguageSettings['surveyls_policy_error'],array('class'=>'form-control','cols'=>'80','rows'=>'15','id'=>"datasecerror_{$aSurveyLanguageSettings['surveyls_language']}")); ?>
<?php echo getEditor("survey-datasec-error","datasecerror_".$aSurveyLanguageSettings['surveyls_language'], "[".gT("Survey data policy error:", "js")."](".$aSurveyLanguageSettings['surveyls_language'].")",$surveyid,'','',$action); ?>
<?php echo getEditor("survey-datasec-error","datasecerror_".$aSurveyLanguageSettings['surveyls_language'], "[".gT("Privacy policy error:", "js")."](".$aSurveyLanguageSettings['surveyls_language'].")",$surveyid,'','',$action); ?>
</div>
</div>
</div>
Expand Down
Expand Up @@ -24,7 +24,7 @@
<div class="row">
<!-- security notice -->
<div class="form-group">
<label class="control-label" for='showsurveypolicynotice'><?php eT("Show survey policy text with mandatory checkbox:") ; ?></label>
<label class="control-label" for='showsurveypolicynotice'><?php eT("Show privacy policy text with mandatory checkbox:") ; ?></label>
<div class="">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default <?=$oSurvey->showsurveypolicynotice==0 ? 'active' : ''?>" >
Expand Down
6 changes: 3 additions & 3 deletions docs/release_notes.txt
Expand Up @@ -1270,7 +1270,7 @@ Changes from 5.0.10 (build 210723) to 5.0.11 (build 210727) July 27, 2021
-Fixed issue #17436: When editing 'General Settings' site name and pressing 'enter', a layover appears and screen freezes (#1978) (Gabriel Jenik)
-Fixed issue #17427: Bug in 'Answer options' - 'Quick add' (encuestabizdevgit)
-Fixed issue #17425: Misuse of progress bar (#1958) (Denis Chenu)
-Fixed issue #17363: Survey data policy error message not displayed (#1938) (Denis Chenu)
-Fixed issue #17363: Privacy policy error message not displayed (#1938) (Denis Chenu)
-Fixed issue #17269: Canceling activation of survey gives error (#1974) (Gabriel Jenik)


Expand Down Expand Up @@ -2740,7 +2740,7 @@ Changes from 4.1.11 (build 200316) to 4.1.12 (build 200324) March 24, 2020
-Fixed issue #15943: Save and save and close buttons in quick-add conditions not working (Jessica Höck)
-Fixed issue #15912: Error updating database on upgrade from 3.x (Carsten Schmitz)
-Fixed issue #15838: Check database integrity error (Carsten Schmitz)
-Fixed issue #14004: language changer not automatically changing language on selection and will also work without checking the data policy checkbox (Patrick Teichmann)
-Fixed issue #14004: language changer not automatically changing language on selection and will also work without checking the privacy policy checkbox (Patrick Teichmann)
#Updated translation: Swedish by Norfa97
#Updated translation: German by c_schmitz
#Updated translation: French (France) by b00z00, GuillaumeZ6, DenisChenu, eddylackmann
Expand Down Expand Up @@ -4486,7 +4486,7 @@ Changes from 3.13.2 (build 180709) to 3.14.0 (build 180730) July 30, 2018

Changes from 3.13.1 (build 180629) to 3.13.2 (build 180709) July 09, 2018
-Fixed issue #13345: showpopups in config.php seems to have no effect anymore (Dominik Vitt)
-Fixed issue #13802: Unable to see Survey policy without javascript activated (Markus Flür)
-Fixed issue #13802: Unable to see privacy policy without javascript activated (Markus Flür)
-Fixed issue #13804: Error about Data security policy shown when change language + clear all (Markus Flür)
-Fixed issue #13805: Multi-line Text Messages Do Not Exist in Translation. (imacat)
-Fixed issue #13821: When importing a survey I receive a "Failed to Insert [3]" error message (#1090) (githubLewis)
Expand Down
2 changes: 1 addition & 1 deletion themes/survey/vanilla/config.xml
Expand Up @@ -337,7 +337,7 @@
<surveyls_urldescription type="data" twig="on"><![CDATA[ gT("Some URL description") ]]></surveyls_urldescription>
<showsurveypolicynotice>2</showsurveypolicynotice>
<datasecurity_notice_label type="data" twig="on"><![CDATA[ <a href='#data-security-modal-' data-toggle='collapse'> {{ gT('Show Policy') }} </a> ]]></datasecurity_notice_label>
<datasecurity_notice type="data" twig="on"><![CDATA[ {{ gT("Your Privacy policy text is shown here.") }} ]]></datasecurity_notice>
<datasecurity_notice type="data" twig="on"><![CDATA[ {{ gT("Your privacy policy text is shown here.") }} ]]></datasecurity_notice>
</survey>
<group type="core">
<name type="data" twig="on"><![CDATA[ {{ gT("Group 1: The first lot of questions") }} ]]></name>
Expand Down
Expand Up @@ -30,7 +30,7 @@
<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>
<h4 class="modal-title">{{gT('Privacy policy')}}</h4>
</div>
<div class="panel-body {{ aSurveyInfo.class.privacydatasecmodalbody }}">
{{ aSurveyInfo.datasecurity_notice }}
Expand Down

0 comments on commit b68f714

Please sign in to comment.