diff --git a/app/views/admin/edit_web.rhtml b/app/views/admin/edit_web.rhtml index 86382a18..37b35a1d 100644 --- a/app/views/admin/edit_web.rhtml +++ b/app/views/admin/edit_web.rhtml @@ -1,6 +1,7 @@ <% @title = "Edit Web" %> -
Enter system password - + and @@ -109,11 +113,12 @@ Other administrative tasks - + Clean up by entering system password - + and diff --git a/public/javascripts/edit_web.js b/public/javascripts/edit_web.js index a81abf59..0dc48dcf 100644 --- a/public/javascripts/edit_web.js +++ b/public/javascripts/edit_web.js @@ -8,11 +8,18 @@ function cleanAddress() { document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(); } -function validateSetup() { - if (document.getElementById('system_password').value == "") { +function checkSystemPassword(password) { + if (password == "") { alert("You must enter the system password"); return false; } +} + +function validateEditWebForm() { + + if (!checkSystemPassword(document.getElementById('system_password').value)) + return false + end if (document.getElementById('name').value == "") { alert("You must pick a name for the web");
Clean up by entering system password - + and diff --git a/public/javascripts/edit_web.js b/public/javascripts/edit_web.js index a81abf59..0dc48dcf 100644 --- a/public/javascripts/edit_web.js +++ b/public/javascripts/edit_web.js @@ -8,11 +8,18 @@ function cleanAddress() { document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(); } -function validateSetup() { - if (document.getElementById('system_password').value == "") { +function checkSystemPassword(password) { + if (password == "") { alert("You must enter the system password"); return false; } +} + +function validateEditWebForm() { + + if (!checkSystemPassword(document.getElementById('system_password').value)) + return false + end if (document.getElementById('name').value == "") { alert("You must pick a name for the web");