get_focus changes

svn: r19530
This commit is contained in:
Doug Blank 2012-05-15 20:21:45 +00:00
parent 58c54609df
commit 66ecc67627
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
<script type="text/javascript" src="/styles/javascript/jquery-ui-1.7.2.custom.min.js"></script>
{% endblock %}
</head>
<body onload="document.getElementById('get_focus').focus();">
<body onload="if (document.getElementById('get_focus')) {document.getElementById('get_focus').focus();}">
<div id="header">
<h1 id="SiteTitle">{% block heading %}Gramps-Connect{% endblock %}</h1>
</div>

View File

@ -32,7 +32,7 @@
<form method="post">{% csrf_token %}
<tr>
<td class="ColumnAttribute">{{form.surname.label}}:</td>
<td class="ColumnValue" id="data">{% render form.surname user action %}</td>
<td class="ColumnValue" id="data">{% render form.surname user action False "" "get_focus" %}</td>
<td class="ColumnAttribute">{{form.prefix.label}}:</td>
<td class="ColumnValue" id="data">{% render form.prefix user action %}</td>
</tr>