Fix: bad focus

This commit is contained in:
Regis Houssin 2009-12-27 09:22:00 +00:00
parent 9d9de3b016
commit ed1fe6ec72
2 changed files with 5 additions and 7 deletions

View File

@ -84,7 +84,7 @@ if ($_GET["action"] == 'create')
// Si numero deja pris (ne devrait pas arriver), on incremente par .num+1
$sql = "SELECT count(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."propal";
$sql.= " WHERE ref like '$numpr%'";
$sql.= " WHERE ref LIKE '$numpr%'";
$sql.= " AND entity = ".$conf->entity;
$resql=$db->query($sql);
if ($resql)

View File

@ -50,11 +50,9 @@
</style>
<script type="text/javascript">
{literal}
function donnefocus(element) {
document.getElementById(element).focus();
}
{/literal}
function donnefocus() {ldelim}
document.getElementById('{$focus_element}').focus();
{rdelim}
</script>
{if $main_html_header}
@ -64,7 +62,7 @@ function donnefocus(element) {
<!-- HTTP_USER_AGENT = {$smarty.server.HTTP_USER_AGENT} -->
</head>
<body class="body" onload="donnefocus({$focus_element});">
<body class="body" onload="donnefocus();">
<form id="login" name="login" method="post" action="{$php_self}">
<input type="hidden" name="token" value="{$smarty.session.newtoken}">