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

Chore: Admin - Add jQuery to agency base template #2329

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

machikoyasuda
Copy link
Member

closes #2328

This PR adds jQuery to the agency-base template, so all Admin pages that use this template will have access to jQuery. jQuery is used in form.html - the main form base template that the app uses for all forms.

@machikoyasuda machikoyasuda requested a review from a team as a code owner August 29, 2024 19:45
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates labels Aug 29, 2024
Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

<script nonce="{{ request.csp_nonce }}"
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"
integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ="
crossorigin="anonymous"></script>
{% endblock extrastyle %}

Copy link
Member Author

Choose a reason for hiding this comment

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

@angela-tran Should I also add this line from /calitp/app/benefits/core/templates/core/base.html to pull in the recaptcha script, in this PR?

    {% if request.recaptcha %}
      <script nonce="{{ request.csp_nonce }}" src="{{ request.recaptcha.script_api }}"></script>
    {% endif %}

Copy link
Member Author

Choose a reason for hiding this comment

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

I would have preferred to be able to add this to the very bottom of the <body> tag, but there isn't an easy place to override and add this.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I think we can ignore reCAPTCHA for this effort -- the user must have access to the Admin, and I think we can assume they are legit if they can get in and initiate an in-person flow.

@machikoyasuda machikoyasuda self-assigned this Aug 29, 2024
Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

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

👍

@machikoyasuda machikoyasuda merged commit f1e4171 into main Aug 29, 2024
10 checks passed
@machikoyasuda machikoyasuda deleted the feat/2328-admin-jquery branch August 29, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add jQuery to Agency Base
3 participants