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