From 533ef6a1cdfd61ffcc0bbbf295002a421154451d Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Thu, 10 Feb 2005 21:55:13 +0000 Subject: [PATCH] Fixed the JavaScript in edit_web.js --- public/javascripts/edit_web.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/public/javascripts/edit_web.js b/public/javascripts/edit_web.js index 0dc48dcf..01efc888 100644 --- a/public/javascripts/edit_web.js +++ b/public/javascripts/edit_web.js @@ -12,31 +12,28 @@ function checkSystemPassword(password) { if (password == "") { alert("You must enter the system password"); return false; + } else { + return true; } } function validateEditWebForm() { - - if (!checkSystemPassword(document.getElementById('system_password').value)) - return false - end - + if (!checkSystemPassword(document.getElementById('system_password').value)) { + return false; + } if (document.getElementById('name').value == "") { alert("You must pick a name for the web"); return false; } - if (document.getElementById('address').value == "") { alert("You must pick an address for the web"); return false; } - if (document.getElementById('password').value != "" && document.getElementById('password').value != document.getElementById('password_check').value) { alert("The password and its verification doesn't match"); return false; } - return true; }