Ticket #10573: 10573_r12827_with_fields.diff
File 10573_r12827_with_fields.diff, 784 bytes (added by , 15 years ago) |
---|
-
django/contrib/admin/templates/admin/change_form.html
55 55 56 56 {% submit_row %} 57 57 58 {% if adminform and add %} 59 <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script> 58 {% if adminform and add and adminform.form.fields %} 59 <script type="text/javascript"> 60 (function($) { 61 $(document).ready(function($) { 62 $("input:visible:enabled:first").focus(); 63 }); 64 })(jQuery.noConflict()); 65 </script> 60 66 {% endif %} 61 67 62 68 {# JavaScript for prepopulated fields #}