Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7903 -- Allow admin's prepopulated_from to work with TextField…

…s. Patch

from mk and Alex Gaynor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b3688e81943d6d059d3f3c95095498a5aab84852 1 parent aa78a05
Malcolm Tredinnick authored August 23, 2008
4  django/contrib/admin/templates/admin/prepopulated_fields_js.html
@@ -4,8 +4,8 @@
4 4
     {% for dependency in field.dependencies %}
5 5
     document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
6 6
         var e = document.getElementById("{{ field.field.auto_id }}");
7  
-        if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length }}); }
  7
+        if (!e._changed) { e.value = URLify({% for innerdep in field.dependencies %}document.getElementById("{{ innerdep.auto_id }}").value{% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }}); }
8 8
     }
9 9
     {% endfor %}
10 10
 {% endfor %}
11  
-</script>
  11
+</script>

0 notes on commit b3688e8

Please sign in to comment.
Something went wrong with that request. Please try again.