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

#8689ycn7z Update Subscription form for HUB users #351

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

sab-LC
Copy link
Collaborator

@sab-LC sab-LC commented Sep 30, 2024

Issue:

Description:
For accounts that are unsubscribed, they should still be able to access the subscription form from their settings page if they would like to inquire again about a subscription. When clicking on button in either case below, this should lead to the subscription web form. I think the form can prefill with name email and Affiliation/Organization name but allowing the user to edit the name and email in case they have a different contact they'd like to add for the subscription request.

Currently, if Affiliation/Organization is already in the Hub, it redirects the user to join that account. But if the user is brought to this form from that account by clicking the subscription request button, it should still send the request since it would be the admin of that account inquiring about a subscription. (Example: if an anon user or someone not a part of the Local Contexts institution account tries to submit the form for Local Contexts, they would be redirected to request to join the account. If a logged in admin of the Local Contexts account requests a subscription, it allows the form to submit.)
More details of ticket.

Solution:

  • Added Subscription form template.
  • Updated Institution and Researcher views to add subscription form api's.
  • Updated Subscription settings templates to add the link to subscription form template.
  • Updated main.js to handle the forms validation on frontend.

After:

Institutions
lead_data:
{'hubId': '1_i', 'companyName': 'TESTING SABEEN ACCOUNT', 'email': 'sabeen.ammar+909@localcontexts.org', 'firstname': 'institution', 'lastName': 'account', 'oppName': 'TESTING SABEEN ACCOUNT', 'inquiryType': 'Subscription', 'isBusinessTrue': True}

institutionaccount.mp4

Researcher
lead_data:
{'hubId': '1_r', 'companyName': 'researcher account', 'email': 'sabeen.ammar+94449@localcontexts.org', 'firstname': 'researcher', 'lastName': 'account', 'oppName': 'researcher account', 'inquiryType': 'Subscription', 'isBusinessTrue': False}

researcher.mp4

@sab-LC sab-LC self-assigned this Sep 30, 2024
@sab-LC sab-LC changed the title Added subscription form for institutions #8689ycn7z Update Subscription form for HUB users Oct 1, 2024
@arojas1
Copy link
Contributor

arojas1 commented Oct 1, 2024

@sab-LC sab-LC marked this pull request as ready for review October 3, 2024 19:19
institutions/views.py Outdated Show resolved Hide resolved
@lc-hd lc-hd self-requested a review October 4, 2024 15:26
Copy link
Collaborator

@lc-hd lc-hd left a comment

Choose a reason for hiding this comment

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

I left a couple of comments but in general, looks good to me

@sab-LC
Copy link
Collaborator Author

sab-LC commented Oct 8, 2024

I left a couple of comments but in general, looks good to me

I've addressed both the comments. Let me know if there's anything else you'd like me to look into.

@sab-LC sab-LC force-pushed the 8689ycn7z-subscription-form-for-HUB branch from bf3c9e6 to ed45bf7 Compare October 10, 2024 19:42
@birbjam birbjam merged commit 6709285 into subscriptions Oct 10, 2024
1 check passed
@birbjam birbjam deleted the 8689ycn7z-subscription-form-for-HUB branch October 10, 2024 20:41
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.

4 participants