diff --git a/views/bootstrap/class.FolderAccess.php b/views/bootstrap/class.FolderAccess.php index 5253a644d..bcbee1872 100644 --- a/views/bootstrap/class.FolderAccess.php +++ b/views/bootstrap/class.FolderAccess.php @@ -39,21 +39,9 @@ class SeedDMS_View_FolderAccess extends SeedDMS_Bootstrap_Style { print "\n"; } /* }}} */ - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - $rootfolderid = $this->params['rootfolderid']; - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + function js() { /* {{{ */ + header('Content-Type: application/javascript; charset=UTF-8'); ?> - - - +$(document).ready(function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $rootfolderid = $this->params['rootfolderid']; + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("edit_folder_access")); $this->contentContainerStart(); @@ -227,7 +234,7 @@ function checkForm() print "
"; } ?> -
+ diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index f3bc8865f..e798547dc 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -31,24 +31,9 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_FolderNotify extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - $strictformcheck = $this->params['strictformcheck']; - - $notifyList = $folder->getNotifyList(); - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); - + function js() { /* {{{ */ + header('Content-Type: application/javascript; charset=UTF-8'); ?> - - - +$(document).ready(function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + $strictformcheck = $this->params['strictformcheck']; + + $notifyList = $folder->getNotifyList(); + + $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); + $this->contentHeading(getMLText("edit_existing_notify")); $this->contentContainerStart(); @@ -125,7 +131,7 @@ function checkForm() ?>
- + diff --git a/views/bootstrap/class.ForcePasswordChange.php b/views/bootstrap/class.ForcePasswordChange.php index 61f921fb3..64fc5577c 100644 --- a/views/bootstrap/class.ForcePasswordChange.php +++ b/views/bootstrap/class.ForcePasswordChange.php @@ -31,6 +31,42 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_ForcePasswordChange extends SeedDMS_Bootstrap_Style { + function js() { /* {{{ */ + $strictformcheck = $this->params['strictformcheck']; + + header('Content-Type: application/javascript'); +?> +function checkForm() +{ + msg = new Array(); + + if($("#currentpwd").val() == "") msg.push(""); + if($("#pwd").val() == "") msg.push(""); + if($("#pwd").val() != $("#pwdconf").val()) msg.push(""); + if (msg != "") { + noty({ + text: msg.join('
'), + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + _timeout: 1500, + }); + return false; + } + else + return true; +} + +$(document).ready( function() { + $('body').on('submit', '#form', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); +params['dms']; $user = $this->params['user']; @@ -43,7 +79,7 @@ class SeedDMS_View_ForcePasswordChange extends SeedDMS_Bootstrap_Style { echo "
".getMLText('password_expiration_text')."
"; $this->contentContainerStart(); ?> - + @@ -51,7 +87,7 @@ class SeedDMS_View_ForcePasswordChange extends SeedDMS_Bootstrap_Style { - +
:
:
: