@@ -241,6 +241,15 @@
tosRules() {
return [value => (value ? true : this.$tr('ToSRequiredMessage'))];
},
+ acceptedAgreement: {
+ get() {
+ return this.form.accepted_tos && this.form.accepted_policy;
+ },
+ set(accepted) {
+ this.form.accepted_tos = accepted;
+ this.form.accepted_policy = accepted;
+ },
+ },
usageOptions() {
return [
@@ -411,6 +420,9 @@
showOtherField(id) {
return id === uses.OTHER && this.form.uses.includes(id);
},
+ updateAcceptedAgreement() {
+ this.acceptedAgreement = this.form.accepted_tos && this.form.accepted_policy;
+ },
submit() {
if (this.$refs.form.validate()) {
@@ -446,7 +458,6 @@
registrationFailed: 'There was an error registering your account. Please try again',
registrationFailedOffline:
'You seem to be offline. Please connect to the internet to create an account.',
-
// Basic information strings
basicInformationHeader: 'Basic information',
firstNameLabel: 'First name',
diff --git a/contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js b/contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js
index dc9f24df06..6b2594f8b2 100644
--- a/contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js
+++ b/contentcuration/contentcuration/frontend/accounts/pages/__tests__/create.spec.js
@@ -62,7 +62,6 @@ function makeWrapper(formData) {
});
return wrapper;
}
-
function makeFailedPromise(statusCode) {
return () => {
return new Promise((resolve, reject) => {
From 471b192dce55d883b09cbd21a7514e81d5c354a5 Mon Sep 17 00:00:00 2001
From: Allan Otodi Opeto <103313919+AllanOXDi@users.noreply.github.com>
Date: Fri, 13 Jan 2023 19:04:06 +0300
Subject: [PATCH 6/8] fix PR failed run test
---
.../contentcuration/frontend/accounts/pages/Create.vue | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
index 9a495349b8..2c582fc622 100644
--- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
+++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
@@ -133,13 +133,12 @@
@@ -420,10 +419,6 @@
showOtherField(id) {
return id === uses.OTHER && this.form.uses.includes(id);
},
- updateAcceptedAgreement() {
- this.acceptedAgreement = this.form.accepted_tos && this.form.accepted_policy;
- },
-
submit() {
if (this.$refs.form.validate()) {
let cleanedData = this.clean(this.form);
From 1fd6b3df03391257ade780112aa381c43e471063 Mon Sep 17 00:00:00 2001
From: Allan Otodi Opeto <103313919+AllanOXDi@users.noreply.github.com>
Date: Tue, 17 Jan 2023 22:35:39 +0300
Subject: [PATCH 7/8] minor code cleanup
---
.../frontend/accounts/pages/Create.vue | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
index 2c582fc622..7e7c823efb 100644
--- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
+++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
@@ -131,12 +131,12 @@
/>
-
+
@@ -237,7 +237,7 @@
passwordConfirmRules() {
return [value => (this.form.password1 === value ? true : this.$tr('passwordMatchMessage'))];
},
- tosRules() {
+ tosAndPolicyRules() {
return [value => (value ? true : this.$tr('ToSRequiredMessage'))];
},
acceptedAgreement: {
@@ -498,7 +498,7 @@
// Privacy policy + terms of service
viewToSLink: 'View Terms of Service',
- ToSRequiredMessage: 'Please accept our terms of service',
+ ToSRequiredMessage: 'Please accept our terms of service and policy',
viewPrivacyPolicyLink: 'View Privacy Policy',
contactMessage: 'Questions or concerns? Please email us at content@learningequality.org',
@@ -524,6 +524,10 @@
}
}
+ .policy-checkbox /deep/ .v-messages {
+ margin-left: 40px;
+ }
+
iframe {
width: 100%;
min-height: 400px;
From 70ac9e5a4cd2aafde5ab1b75b201141814797d28 Mon Sep 17 00:00:00 2001
From: Blaine Jester
Date: Fri, 27 Jan 2023 12:20:43 -0800
Subject: [PATCH 8/8] Remove min-height from error messages
---
.../contentcuration/frontend/accounts/pages/Create.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
index 7e7c823efb..4521b84337 100644
--- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
+++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue
@@ -525,6 +525,7 @@
}
.policy-checkbox /deep/ .v-messages {
+ min-height: 0;
margin-left: 40px;
}