summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-01-29 01:27:57 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-01-29 01:27:57 +0000
commite6cd7fcacc37ad276dac75a24de8882c42bc8639 (patch)
tree66401cce1d025f34242f2cf08d51fda591d67170
parent126c6cef5227ae91c2c3ea92eba220735e1bc411 (diff)
newforms-admin: Removed auto_populated_field_script template tag, which is no longer used
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/admin/templatetags/admin_modify.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py
index ab700d369d..3165f2e321 100644
--- a/django/contrib/admin/templatetags/admin_modify.py
+++ b/django/contrib/admin/templatetags/admin_modify.py
@@ -143,23 +143,6 @@ def output_all(form_fields):
return ''.join([str(f) for f in form_fields])
output_all = register.simple_tag(output_all)
-def auto_populated_field_script(auto_pop_fields, change = False):
- t = []
- for field in auto_pop_fields:
- if change:
- t.append('document.getElementById("id_%s")._changed = true;' % field.name)
- else:
- t.append('document.getElementById("id_%s").onchange = function() { this._changed = true; };' % field.name)
-
- add_values = ' + " " + '.join(['document.getElementById("id_%s").value' % g for g in field.prepopulate_from])
- for f in field.prepopulate_from:
- t.append('document.getElementById("id_%s").onkeyup = function() {' \
- ' var e = document.getElementById("id_%s");' \
- ' if(!e._changed) { e.value = URLify(%s, %s);} }; ' % (
- f, field.name, add_values, field.maxlength))
- return ''.join(t)
-auto_populated_field_script = register.simple_tag(auto_populated_field_script)
-
def field_widget(parser, token):
bits = token.contents.split()
if len(bits) != 2: