From a17e1c21c24d166ff0abdb30677b53848bae43d8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Dec 2011 23:41:49 +0100 Subject: [PATCH] MINOR Suppress inline JS validation scripts in CMS (they don't work with ajax-loaded content) --- admin/code/LeftAndMain.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 2c34c0050..99cf0ddda 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -133,6 +133,9 @@ class LeftAndMain extends Controller { * @uses CMSMenu */ function init() { + // Suppress behaviour/prototype validation instructions in CMS, not compatible with ajax loading of forms. + Validator::set_javascript_validation_handler('none'); + parent::init(); SSViewer::setOption('rewriteHashlinks', false); @@ -187,6 +190,12 @@ class LeftAndMain extends Controller { if(empty($_REQUEST['executeForm']) && !$this->isAjax()) $this->extend('accessedCMS'); // Requirements + + // Suppress behaviour/prototype validation instructions in CMS, not compatible with ajax loading of forms. + Validator::set_javascript_validation_handler('none'); + + // Set the members html editor config + HtmlEditorConfig::set_active(Member::currentUser()->getHtmlEditorConfigForCMS()); Requirements::combine_files( 'lib.js',