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.
We also should do a followup issue somewhere about why there is no confirmation form on "delete role"... that's a little dangerous. However, it's a preexisting problem.
Comments
Comment #1
catchSpoke to Mr Bailey's in irc, I hadn't actually reviewed the hunk of code and we determined it's a not a CRSF due to lack of link, just inconsistent, so retitling and downgrading.
Comment #2
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedAttached patch will add confirm form.
Comment #4
aspilicious CreditAttribution: aspilicious commentedProbably you need to change some tests
Comment #5
sunThe tests need to be updated accordingly.
Trailing white-space here (and below).
This should really be a separate form button submit handler.
The cast to integer shouldn't be required.
142 critical left. Go review some!
Comment #6
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented1. Updated test.
2. Removed type casting and
$form['name']
fromuser_admin_role_delete_confirm()
.Comment #7
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedComment #9
sunWe are missing a 'page callback' here.
We still want to add a separate form button #submit handler user_admin_role_delete_submit() instead of this mixing here.
We should keep the original line here and just add a
$this->drupalPost(NULL, NULL, t('Delete'));
afterwards, so the proper redirection is tested as well.
142 critical left. Go review some!
Comment #10
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented@Sun Thanks for your comments. Type casting is required otherwise
user_role_delete()
does not works as expected.Added page callback.
FYI: Role edit menu item is also not using 'page callback' see http://drupal.org/node/619584#comment-2771532
I am not sure how to add #submit there.
Done.
Comment #11
andypost@sivaji Take an example from http://api.drupal.org/api/function/node_form/7 for handler node_form_delete_submit()
Comment #12
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedI guess point 2 in #9 mean this
Comment #13
Dries CreditAttribution: Dries commentedThis looked good to me. Committed to CVS HEAD. Thanks!