Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After chatting with RobLoach and cweagans on IRC, we came to the agreement, that the configuration form link should rather point to admin/config/development/jquery_update instead of to the development/performance forms, like it is atm. This needs another hook_form(), since jQuery update alters the form of development performance in the moment.
Ok, here we are. Patch follows in the next hours
Comment | File | Size | Author |
---|---|---|---|
#7 | jquery_update-configuration_page-1449574-7.patch | 2.94 KB | dqd |
#4 | jquery_update-configuration_page-1449574-4.patch | 2.94 KB | dqd |
#1 | jquery_update-configuration_page-1449574-2.patch | 2.85 KB | dqd |
Comments
Comment #1
dqdAnd here it is ...
(since this is an own configuration page now, it needed another hook_menu and permission implementation, and the form isn't altering another form no more, so this part needed small changes like
function rename and return system_settings_form($form)
etc...)Comment #2
dqdstatus ...
Comment #3
cweagansThis should probably be 'administer jquery update configuration' (all lowercase for consistency). The use of the word 'administer' is also consistent with our other admin pages.
Don't forget to change the permission name here too. The description could probably use a bit of work: the admin page itself doesn't upgrade jQuery (the module does that). The admin page allows users to configure settings related to the jQuery upgrade. Not sure how to phrase that, though.
This should probably be jquery_update_settings_form() (so that we know it's a form builder function)
Comment #4
dqdcweagans: that the access argument value needs to be identical to the permission array name is clear, for sure. But your example text in the first comment ( "This should probably be 'administer jquery update configuration' (all lowercase for consistency)") is confusing, since you use the title as an example, not the array name.
Also I wouldn't agree with changing a readable title to another name convention of jQuery than jQuery. So I think, you rather asked me to change the permission array name, which refers to the identical access argument value of course ;)
Yeah, the description doesn't exist before, and I took the first sentence from the module project page on d.o. - But I think your phrase suggestion is quite good already and I just added path and compression. ;)
I don't have a problem with jquery_update_settings_form().
Thanks for the fast review! cweagans++
So, ok, here it is so far ...
Comment #5
dqdComment #6
cweagansInstead of 'access jquery update', use 'administer jquery update configuration'.
To be in line with the previous change, replace 'access jquery update' with 'administer jquery update configuration'
Comment #7
dqd... aaah, now I got it! *lol*
you must know it's 3:44 in the morning here .... heh
also changed description to: "Configure settings related to the jQuery upgrade, the library path and compression." like spoken in IRC.
Comment #8
cweagansCode looks good. Everything works as expected. Good job.
Comment #8.0
cweagansadd info
Comment #9
RobLoachThanks a lot for the help, guys!!! Looks great. Committed with two small changes:
Thanks so much!!! This is awesome.
Comment #10.0
(not verified) CreditAttribution: commentedUpdated issue summary.