﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
11431	prepopulated_fields fails to update multiple fields from one source	Flo Ledermann	nobody	"When using something like this in the admin

{{{
    prepopulated_fields = {'shortname': ('title',), 'slug': ('title',), }
}}}

only one of the fields is correctly auto-populated. The reason is that contrib/admin/templates/admin/prepopulated_fields_js.html generates very simple javascript that overwrites the event listener on the source field used for updating the target field:

{{{
{% for dependency in field.dependencies %}
    document.getElementById(""{{ dependency.auto_id }}"").onkeyup = function() {
...
}}}

This should be replaced by calls to addEvent (from contrib/admin/media/js/core.js):

{{{
{% for dependency in field.dependencies %}
    addEvent(document.getElementById(""{{ dependency.auto_id }}""), ""keyup"", function() {
...
}}}

I cannot create a patch right now but this should be straightforward to fix in one minute for someone with the infrastructure in place."		closed	contrib.admin	1.0		duplicate			Unreviewed	0	0	0	0	0	0
