Permalink
Browse files

MINOR Suppress inline JS validation scripts in CMS (they don't work w…

…ith ajax-loaded content)
  • Loading branch information...
1 parent 0dd32ba commit a17e1c21c24d166ff0abdb30677b53848bae43d8 @chillu chillu committed Dec 12, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 admin/code/LeftAndMain.php
@@ -133,6 +133,9 @@ function canView($member = null) {
* @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 @@ function init() {
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',

0 comments on commit a17e1c2

Please sign in to comment.