Fix: scripts fail with user form missing
This commit is contained in:
parent
1b01926220
commit
4f2873ea20
@ -28,7 +28,7 @@ function addUser() {
|
||||
|
||||
function editUser() {
|
||||
var userForm = document.getElementsByName('user')[0];
|
||||
var userLogin = userForm.options[userForm.selectedIndex].text;
|
||||
var userLogin = (userForm !== undefined) ? userForm.options[userForm.selectedIndex].text : auth;
|
||||
if (userLogin == auth) {
|
||||
alert(lang['selfeditwarn']);
|
||||
return;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
function editTrack() {
|
||||
var userForm = document.getElementsByName('user')[0];
|
||||
var trackUser = userForm.options[userForm.selectedIndex].text;
|
||||
var trackUser = (userForm !== undefined) ? userForm.options[userForm.selectedIndex].text : auth;
|
||||
if (trackUser != auth && !admin) {
|
||||
alert(lang['owntrackswarn']);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user