Bit of an edge case here, but I was trying to set up a mechanism where a references dialog form would have field values prepopulated from data contained in the parent form (potentially unsubmitted data hence would need to be done via javascript).
I wrote a behaviour that appended a query string to the 'add [node type]' href attribute, but unfortunately, the code in Drupal.ReferencesDialog.open appends it's own query string without checking for a pre-existing one.
I've put together a patch (attached), but this is the first patch I've ever submitted so apologies if I've done it horribly wrong.
Thanks,
Paul.
Comment | File | Size | Author |
---|---|---|---|
patch.diff | 793 bytes | PQ | |
Comments
Comment #1
BrankoC CreditAttribution: BrankoC commentedShouldn't this be labelled a bug report if it fixes a bug?
Comment #2
PQ CreditAttribution: PQ commentedI wasn't sure, I thought I might be presenting a new use case, and so feature seems appropriate, but if the maintainers feels otherwise then this can be changed.
Thanks,
Paul.
Comment #3
BrankoC CreditAttribution: BrankoC commentedEr, you're right, I only looked at the problem your patch fixed, but your issue is about more than the bug.
Comment #4
fabsor CreditAttribution: fabsor commentedHi!
This seems OK to me. Commited:
http://drupal.org/commitlog/commit/23918/e4799feebed0fab6dcee3a7bf59d2a6...
Next time you submit a patch, create the patch from the module directory instead of your Drupal root.
Comment #5
PQ CreditAttribution: PQ commentedThanks Fabsor, I'll bear that in mind next time,
Paul.