mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Much cooler way to set the form focus after an error. Sent in by Greg Barnett.
This commit is contained in:
parent
778c28671a
commit
93f03cc436
@ -34,11 +34,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
if ($err) {
|
||||
foreach ((array)$err as $key => $value) {
|
||||
$focus = "form.$key";
|
||||
}
|
||||
}
|
||||
if ($err) {
|
||||
$focus = 'form.' . array_shift(array_flip(get_object_vars($err)));
|
||||
}
|
||||
|
||||
if (!$user->country and $CFG->country) {
|
||||
$user->country = $CFG->country;
|
||||
|
Loading…
x
Reference in New Issue
Block a user