-
Notifications
You must be signed in to change notification settings - Fork 26
Story 2412: Sign Up Page Integration #2482
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
base: develop
Are you sure you want to change the base?
Changes from 6 commits
2c65f7c
63fd563
ef5268a
4c57ebc
aa2b119
29dcc1b
0d96767
c6194c2
347d59e
da6bb83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,15 +18,16 @@ | |||||
| redirect_field_value (string, optional, default unset) — URL to redirect to after signup; hidden input omitted when unset | ||||||
| password_rules (list, optional, default unset) — rule objects for password validation checklist | ||||||
| {% endcomment %} | ||||||
| {% load static %} | ||||||
| {% load static socialaccount %} | ||||||
| {% block auth_content %} | ||||||
| <div class="auth-page__header"> | ||||||
| <h1 class="auth-page__title">Create an account</h1> | ||||||
| <p class="auth-page__subtitle">Advance your career, learn from experts, and help shape the future of Boost and C++.</p> | ||||||
| </div> | ||||||
| <form class="auth-page__card" | ||||||
| <form class="auth-page__card auth-page__signup-form" | ||||||
| id="signup_form" | ||||||
| method="post" | ||||||
| action="" | ||||||
| action="/accounts/signup/" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify the project has a named signup URL and detect hardcoded signup actions.
fd -i 'urls.py' | xargs rg -n "account_signup|accounts/signup|name=['\"]account_signup['\"]"
rg -n 'action="/accounts/signup/"' templatesRepository: boostorg/website-v2 Length of output: 521 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Inspect surrounding lines in the template
echo "---- templates/v3/accounts/signup.html:25-40 ----"
nl -ba templates/v3/accounts/signup.html | sed -n '25,45p'
# 2) Find all hardcoded signup action usages
echo "---- hardcoded action=\"/accounts/signup/\" in templates ----"
rg -n 'action="/accounts/signup/"' templates || true
# 3) Confirm how account_signup is defined and referenced
echo "---- definition of name=\"account_signup\" ----"
rg -n 'name="account_signup"' config/urls.py
echo "---- usages of account_signup (templates) ----"
rg -n "{%\s*url\s+['\"]account_signup['\"]\s*%}" -S templates || true
echo "---- usages of /accounts/signup/ in templates ----"
rg -n '/accounts/signup/' -S templates || true
# 4) Check tests expectations
echo "---- tests referencing account_signup ----"
rg -n 'account_signup|/accounts/signup/' users/tests/test_urls.pyRepository: boostorg/website-v2 Length of output: 174 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- templates/v3/accounts/signup.html:25-40 ----"
cat -n templates/v3/accounts/signup.html | sed -n '25,45p'
echo "---- hardcoded action=\"/accounts/signup/\" in templates ----"
rg -n 'action="/accounts/signup/"' templates || true
echo "---- definition of name=\"account_signup\" ----"
rg -n 'name="account_signup"' config/urls.py
echo "---- usages of account_signup via {% url %} (templates) ----"
rg -n "{%[[:space:]]*url[[:space:]]+['\"]account_signup['\"][[:space:]]*%}" -S templates || true
echo "---- usages of /accounts/signup/ (templates) ----"
rg -n '/accounts/signup/' -S templates || true
echo "---- tests referencing account_signup and /accounts/signup/ ----"
rg -n 'account_signup|/accounts/signup/' users/tests/test_urls.pyRepository: boostorg/website-v2 Length of output: 1987 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- config/urls.py:120-160 ----"
sed -n '120,160p' config/urls.py | cat -n
echo "---- any existing {% url 'account_signup' %} usage in templates ----"
rg -n "{%\s*url\s+['\"]account_signup['\"]\s*%}" -S templates || true
echo "---- any existing {% url account_signup %} usage (non-quoted) in templates ----"
rg -n "{%\s*url\s+account_signup\s*%}" -S templates || true
echo "---- all hardcoded /accounts/signup/ occurrences in templates ----"
rg -n '/accounts/signup/' templatesRepository: boostorg/website-v2 Length of output: 2569 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- templates/users/includes/user_join.html ----"
cat -n templates/users/includes/user_join.html | sed -n '1,80p'
echo "---- any 'account_signup' string in templates ----"
rg -n "account_signup" templates || true
echo "---- any url tag usage referencing account_* in templates ----"
rg -n "{%[[:space:]]*url" templates | head -n 50
echo "---- all hardcoded /accounts/signup/ occurrences in repo (limit to html/templates) ----"
rg -n '/accounts/signup/' templates
echo "---- all hardcoded /accounts/signup/ occurrences in entire repo (sanity) ----"
rg -n '/accounts/signup/' . | head -n 50Repository: boostorg/website-v2 Length of output: 843 Use URL reversal for the signup form action (and remove hardcoded signup URLs)
Suggested fix- action="/accounts/signup/"
+ action="{% url 'account_signup' %}"Also consider replacing the hardcoded 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| novalidate | ||||||
| {# djlint:off #} | ||||||
| x-data="{ hasErrors: false }" | ||||||
|
|
@@ -53,17 +54,45 @@ <h1 class="auth-page__title">Create an account</h1> | |||||
| {% for error in form.non_field_errors %}<p class="field__error" role="alert">{{ error }}</p>{% endfor %} | ||||||
| {% endif %} | ||||||
| {% include "v3/includes/_field_checkbox.html" with name="mailing_list" label="Also join the Boost Developers Mailing List" %} | ||||||
| <label class="checkbox auth-page_tou-checkbox" for="checkbox-accept_terms_of_use"> | ||||||
| <input | ||||||
| class="checkbox__input" | ||||||
| type="checkbox" | ||||||
| id="checkbox-accept_terms_of_use" | ||||||
| name="accept_terms_of_use" | ||||||
| value="on" | ||||||
| required | ||||||
| > | ||||||
| <span class="checkbox__box" aria-hidden="true"> | ||||||
| {% include "includes/icon.html" with icon_name="check" icon_class="checkbox__check" %} | ||||||
| </span> | ||||||
| <span class="checkbox__label">I have read and accepted the <a href="{% url 'terms-of-use' %}">Term of Use</a> for this service</span> | ||||||
| </label> | ||||||
| {% if redirect_field_value %} | ||||||
| <input type="hidden" | ||||||
| name="{{ redirect_field_name }}" | ||||||
| value="{{ redirect_field_value }}"> | ||||||
| {% endif %} | ||||||
|
|
||||||
| <label class="auth-page__invisible-check-label" for="checkbox-create"> | ||||||
| <input name="invisible-check-protect" class="checkbox__input" id="checkbox-create" type="checkbox"> | ||||||
| {% include "v3/includes/_button.html" with label="Create Account" type="submit" style="primary" alpine_disabled="hasErrors" %} | ||||||
| </form> | ||||||
| <p class="auth-page__divider">OR</p> | ||||||
| <div class="auth-page__social-card"> | ||||||
| {% include "v3/includes/_button.html" with label="Continue with GitHub" url="#" icon_name="github" style="secondary" %} | ||||||
| {% include "v3/includes/_button.html" with label="Continue with Google" url="#" icon_name="google-colored" style="secondary" %} | ||||||
| </label> | ||||||
| <p class="auth-page__divider">OR</p> | ||||||
| {% get_providers as socialaccount_providers %} | ||||||
| {% if socialaccount_providers %} | ||||||
| {% for provider in socialaccount_providers %} | ||||||
| <label class="auth-page__invisible-check-label" for="checkbox-{{provider.name}}"> | ||||||
| {% provider_login_url provider process="login" scope=scope auth_params=auth_params as href %} | ||||||
| <input name="invisible-check-protect" class="checkbox__input" id="checkbox-{{provider.name}}" type="checkbox"> | ||||||
| {% if provider.name == "GitHub" %} | ||||||
| {% include "v3/includes/_button.html" with label="Continue with "|add:provider.name url=href icon_name="github" style="secondary" %} | ||||||
| {% elif provider.name == "Google" %} | ||||||
| {% include "v3/includes/_button.html" with label="Continue with "|add:provider.name url=href icon_name="google-colored" style="secondary" %} | ||||||
| {% endif %} | ||||||
| </label> | ||||||
| {% endfor %} | ||||||
| {% endif %} | ||||||
| {% include "v3/includes/_button.html" with label="Already have an account? Sign in →" url=login_url style="primary" %} | ||||||
| </div> | ||||||
| </form> | ||||||
| {% endblock auth_content %} | ||||||
Uh oh!
There was an error while loading. Please reload this page.