Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added checks for confirm terms and email notifications #5664

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SilentFlameCR
Copy link
Contributor

@SilentFlameCR SilentFlameCR commented Jan 17, 2024

Fixes #5638

Screenshots of new sign up page additions and page existing users that have not confirmed terms will see if the site setting is enabled

image
image

<div className="text-center pb-4">
<Logo />
</div>
<Card className="col-md-4 mx-auto p-4 border-0 card-shadow">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can increase the width of the box here abit to stop the title from wrapping around

Comment on lines 33 to 36

delegate :confirm_terms, to: :object

delegate :email_notifs, to: :object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these are necessary - the serializer should be able to do this automatically (as it does with the other values (ie name, email)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested yeah your right its not needed and works fine without. removed!

Comment on lines +5 to +13
Setting.create!(name: 'ConfirmTerms') unless Setting.exists?(name: 'ConfirmTerms')

return if SiteSetting.exists?(setting: Setting.find_by(name: 'ConfirmTerms'))

SiteSetting.create!(
setting: Setting.find_by(name: 'ConfirmTerms'),
value: false,
provider: 'greenlight'
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're doing a data migration inside of a schema migration. They should be seperated into 2 separate migrations

@@ -19,7 +19,7 @@
class UserSerializer < ApplicationSerializer
include Avatarable

attributes :id, :name, :email, :provider, :language, :avatar, :verified, :created_at
attributes :id, :name, :email, :provider, :language, :avatar, :verified, :confirm_terms, :email_notifs, :created_at
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need access to email_notifs on the front end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the email_notifs are needed on the ConfirmTerms page as along with option to accept terms they also have a toggle to receive email updates and the initial position of that toggle needs the data from the user. (email_notifs is now marketing).

Comment on lines 16 to 17
t.boolean :confirm_terms, default: false
t.boolean :email_notifs, default: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For simplicities sake, I would just call this terms and marketing

Comment on lines 74 to 79
<input
className="form-check-input fs-5"
type="checkbox"
checked={isCheckedEmails}
onChange={() => setIsCheckedEmails(!isCheckedEmails)}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check boxes should be on the left side of the text

@@ -460,6 +465,12 @@
"resend_activation_link": "If you haven't received an activation email or if you are having a problem using it, click on the button below to request a new activation email.",
"resend_btn_lbl": "Resend Verification"
},
"confirm_terms_page": {
"title": "Confirm terms and conditions",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should Accept Our Terms and Conditions

Comment on lines 470 to 471
"account_unconfirmed": "Your account has not accepted the terms and conditions.",
"message": "Please accept the terms and conditions for Greenlight.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to phrase this a bit more gentle. Also, we don't really refer to the app as Greenlight to the end user since they only know it as BBB.

To continue using BigBlueButton, please accept our terms and conditions

"title": "Confirm terms and conditions",
"account_unconfirmed": "Your account has not accepted the terms and conditions.",
"message": "Please accept the terms and conditions for Greenlight.",
"confirm_btn_lbl": "Confirm"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no plain confirm button that we can reuse from somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't find one so I reused the resend button from the VerifyAccount page for a plain confirm.

Copy link

sonarcloud bot commented Jan 19, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a confirmation step after signup to accept T&C's
2 participants