Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ith ajax-loaded content)
  • Loading branch information...
commit a17e1c21c24d166ff0abdb30677b53848bae43d8 1 parent 0dd32ba
@chillu chillu authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 admin/code/LeftAndMain.php
View
9 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',
Please sign in to comment.
Something went wrong with that request. Please try again.