Fix the admin's add/change repository form

Review Request #3334 — Created Sept. 19, 2012 and submitted

Information

Review Board

Reviewers

The admin add/change repository form is missing it's jQuery dependency.

Re-introduced jQuery into the template that displays the admin repository
form to satisfy the forms JS' dependency. While Django's admin bundles its
own, namespaced copy of jQuery along with ModelAdmin forms, using Review
Board's copy instead guarantees that we get the version of jQuery we
expect.

Fixes Issue 2742

 
Description From Last Updated

I'm not sure this is the way to fix this. The problem is not that jquery isn't present in the …

SM smacleod

I'm not sure this is the way to fix this. The problem isn't jquery not being included in the page …

SM smacleod
SM
  1. Congratulations on the first review request!
  2. Show all issues
    I'm not sure this is the way to fix this. The problem is not that jquery isn't present in the page ("js/jquery.html" is included in by "templates/base.html"), but that it comes after repositoryform.js. Note that repositoryform.js is included in the "extrahead" block, and then take a look at where {% include "js/jquery.html" %} appears in "templates/base.html".
    1. I missed the other copy of jQuery on the first pass. Thanks for picking up on this!
  3. Show all issues
    I'm not sure this is the way to fix this. The problem isn't jquery not being included in the page ("js/jquery.html" is included by "templates/base.html"), but that it comes after repositoryform.js. Note that repositoryform.js is included in the "extrahead" block, and then take a look at where {% include "js/jquery.html" %} appears in "templates/base.html".
    1. Strange, I edited my comment to actually be readable, but this old version was kept. How embarrassing :P
  4. 
      
KA
KA
KA
mike_conley
  1. This definitely fixes the problem for me.  I also think you're solution is the correct one.
    
    Based on that, this has my Ship It. Thanks for your work!
  2. 
      
KA
Review request changed
Status:
Completed
Change Summary:
Committed as aa349175. Thanks!