Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked select widget - does not considers GET parameters in add new URL #310

Closed
Sovetnikov opened this issue Nov 13, 2014 · 0 comments
Closed

Comments

@Sovetnikov
Copy link

Have running suit with django 1.7 and got a problem with linked select widget.
Link on right side is based on Add new command URL, don't know why, but i have add new URL like http://127.0.0.1:8080/admin/main/marketmember/add/?_to_field=id
and because of it URL for selected object comes like this http://127.0.0.1:8080/admin/main/marketmember/add/?_to_field=id/../3

Linked select JS handler must consider GET parameters in the add new URL.
I have made a fix in suit.js, think it needs to be included in repo:
var get_url = function ($add_link, $select) {
var value = $select.val();
return $add_link.attr('href').substring( 0, $add_link.attr('href').indexOf( "?" ) ) + '../' + value + '/';
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant