When "New Account" is set, the javascript will automatically reset the LGz ID to zero. Here the code to replace in frontend.php:
$lists["newaccount"] = mosHTML::yesnoSelectList( 'lgz[newaccount]', ' class="inputbox" size="1" onChange="javascr
if(!@$data->firstname && !@$data->lastname) {
list($data->firstname, $data->lastname) = split( " ", $user->name );
}
if(!@$data->email) {
$data->email = $user->email;
}
if(!@$data->name) {
$data->name = $user->username;
}
?>
function changeNewAccount(VALUE) {
if(VALUE == 1) {
document.getElementById('league_lgz_lgzid').value = '';
}
}
Do not forget to also add the id="league_lgz_lgzid" for the lgz id input field. |