Ticket #7903: 7903.diff

File 7903.diff, 1.1 KB (added by Alex, 7 years ago)
  • django/contrib/admin/templates/admin/prepopulated_fields_js.html

    diff --git a/django/contrib/admin/templates/admin/prepopulated_fields_js.html b/django/contrib/admin/templates/admin/prepopulated_fields_js.html
    index 9e78c34..a78d5da 100644
    a b  
    44    {% for dependency in field.dependencies %}
    55    document.getElementById("{{ dependency.auto_id }}").onkeyup = function() {
    66        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{%
     8if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }}); }
    89    }
    910    {% endfor %}
    1011{% endfor %}
    11 </script>
    12  No newline at end of file
     12</script>
Back to Top