Commit 8c507c8b authored by Maria Sorica's avatar Maria Sorica Committed by Robert Lyon

Bug 1746259: Add the T&C to the register form

Had to change the definition of the following strings:
"siteprivacystatement"      to "siteprivacy"
"sitetermsstatement"        to "sitetermsandconditions"
"institutiontermsstatement" to "institutiontermsandconditions"

behatnotneeded

Change-Id: Ib2fd10b72ab4d6d80299a120e9cfbd11bd9fc8fe
parent 5f27da1e
This diff is collapsed.
......@@ -21,4 +21,4 @@ $institution = param_alphanum('institution', null);
$privacy = get_latest_privacy_versions(array($institution));
json_headers();
print json_encode($privacy[0]);
print json_encode($privacy);
......@@ -1345,13 +1345,13 @@ $string['editversion'] = 'Edit version %s';
$string['privacylastversion'] = 'Privacy statements must have unique version names of up to 15 characters. The latest version for this privacy statement is "%s".';
$string['termsandconditionslastversion'] = 'Terms and conditions must have unique version names of up to 15 characters. The latest version for this privacy statement is "%s".';
$string['versionalreadyexist'] = 'A %s version with the name "%s" already exists.';
$string['siteprivacystatement'] = 'Site privacy statement';
$string['sitetermsstatement'] = 'Site terms and conditions';
$string['siteprivacy'] = 'Site privacy statement';
$string['sitetermsandconditions'] = 'Site terms and conditions';
$string['addoneversionlink'] = '<a href="%s">Add one</a> if you need it.';
$string['privacyversionfor'] = 'Privacy statement for version "%s" is as follows:';
$string['termsversionfor'] = 'Terms and conditions for version "%s" is as follows:';
$string['institutionprivacystatement'] = 'Institution privacy statement';
$string['institutiontermsstatement'] = 'Institution terms and conditions';
$string['institutiontermsandconditions'] = 'Institution terms and conditions';
$string['userprivacypagedescription'] = 'Displayed are the current privacy statements and terms and conditions to which you consented.';
$string['lastupdated'] = 'Last updated on';
$string['newprivacy'] = 'Before entering your account, please read the information displayed below.';
......@@ -1363,8 +1363,9 @@ $string['refuseprivacy'] = 'Refuse privacy statement or terms and condititons';
$string['confirmprivacyrefusal'] = 'Are you really sure you wish to continue?';
$string['privacyrefusaldetails'] = 'If you do not consent to the privacy statements or terms and conditions, your account will be suspended.';
$string['privacyrefusal'] = 'Refused to consent to the privacy statement.';
$string['registerprivacyrefusal'] = 'Your account will not be created when you do not consent to the privacy statement.';
$string['registerprivacydetails'] = 'Please read the privacy statement. If you do not consent to it, you cannot create an account on the site.';
$string['registerrefusal'] = 'Your account will not be created when you do not consent to the %s.';
$string['registerprivacy'] = 'Please read the privacy statement. If you don not consent to it, you cannot create an account on the site.';
$string['registertermsandconditions'] = 'Please read the terms and conditions. If you don not consent to them, you cannot create an account on the site.';
$string['enterreason'] = 'Please enter the reason of refusal here...';
$string['hasrefused'] = 'has refused the privacy statement';
$string['privacylowcase'] = 'privacy statement';
......
......@@ -24,7 +24,7 @@
<legend>
<h4>
<a href="#dropdown-privacyst-{$sitecontent['privacy']->id}" data-toggle="collapse" aria-expanded="false" aria-controls="dropdown" class="collapsed">
{str tag="siteprivacystatement" section="admin"}
{str tag="siteprivacy" section="admin"}
<span class="icon icon-chevron-down collapse-indicator right pull-right"> </span>
</a>
</h4>
......@@ -48,7 +48,7 @@
<legend>
<h4>
<a href="#dropdown-terms-{$sitecontent['termsandconditions']->id}" data-toggle="collapse" aria-expanded="false" aria-controls="dropdown" class="collapsed">
{str tag="sitetermsstatement" section="admin"}
{str tag="sitetermsandconditions" section="admin"}
<span class="icon icon-chevron-down collapse-indicator right pull-right"> </span>
</a>
</h4>
......
......@@ -18,6 +18,7 @@ Scenario: Registering as a new student and checking switch can flick back and fo
| Email address | fakeymcfakey@example.org |
| Registration reason | I will absolutely make this institution more amazing!! |
And I enable the switch "I consent to this privacy statement"
And I enable the switch "I consent to this terms and conditions"
# we wait a human amount of time so the spam trap is avoided
And I wait "4" seconds
And I press "Register"
......
@javascript @core @gdpr
Feature: Strict privacy switch
As a new user logging in for the first time
When strict privacy is enabled
I should be required to accept the privacy statement
Background:
# And the following site settings are set:
#| 'usersallowedmultipleinstitutions' | 0 |
# | 'institutionstrictprivacy' | 1 |
As a new user logging in for the first time
When strict privacy is enabled
I should be required to accept the privacy statement
Scenario: Create user who logs in with strict privacy enabled
Given I log in as "admin" with password "Kupuhipa1"
......@@ -35,14 +29,15 @@ Scenario: Create user who logs in with strict privacy enabled
And I press "Save changes"
And I log out
Given I log in as "bob" with password "Kupuhipa1"
Then I should see "Before entering your account, please read the privacy statement displayed below."
Then I should see "Before entering your account, please read the information displayed below."
# Try to ignore privacy statement
And I choose "Pages and collections" in "Portfolio" from main menu
Then I should see "Before entering your account, please read the privacy statement displayed below."
Then I should see "Before entering your account, please read the information displayed below."
And I press "Save changes"
Then I should see "If you do not consent to the privacy statement, your account will be suspended."
Then I should see "If you do not consent to the privacy statements or terms and conditions, your account will be suspended."
Then I press "No"
# consent to privacy statement
And I enable the switch "I consent to this privacy statement"
And I enable the switch "I consent to this terms and conditions"
And I press "Save changes"
Then I should see "Welcome"
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