When displaying the confirmation form in a popup, and if there is a link in the approve / disapprove / cancel message, clicking on this link will close the popup instead of opening the link. So any link acts as if it is the "Cancel" button.
This is caused by the following block of code in user_relationships_ui.js:
// Making sure the cancel link on each form in the popup closes the popup.
$('#user_relationships_popup_form a').click(function() {
Drupal.user_relationships_ui.hidePopup();
return false;
});
As you can see, any "a" tag will be treated like the cancel link. Patch incoming.
Comments
Comment #1
mdupontThis patch is rather simple: confirm_form() wraps action buttons inside a "div" with the class "container-inline", so by restricting the target to links in this container, only the cancel link will be affected by the js code.
Comment #3
mdupontThis one should have the right paths.
Comment #4
mrf commentedCommitted to 6.x-1.x dev, thanks for the patch and catching this one.
Just did a quick glance at the file and this appears to still be an issue for 7.x so there will need to be a fix there as well.
Comment #5
mrf commentedComment #6
berdirAaand commited as well ;)
Comment #8
bao truong commentedI tried the patch in comment #8 but it didn't work, probably because it was created for a version that was different form mine, I am submitted this patch for the following version:
name = UR-UI
description = "User Relationships UI. This enables basic UI functionality for User Relationships"
package = "User Relationships"
dependencies[] = user_relationships_api
core = 6.x
; Information added by drupal.org packaging script on 2012-01-03
version = "6.x-1.x-dev"
core = "6.x"
project = "user_relationships"
datestamp = "1325552071"
Comment #9
mrf commentedPatch is already applied to both dev branches, no need to re-apply.
Please let us know if you're still seeing the issue in the dev branch.