diff --git a/application/ui.htmleditorwidget.class.inc.php b/application/ui.htmleditorwidget.class.inc.php
index 6b4c98660..f1c3207a1 100644
--- a/application/ui.htmleditorwidget.class.inc.php
+++ b/application/ui.htmleditorwidget.class.inc.php
@@ -99,7 +99,7 @@ class UIHTMLEditorWidget
// Could also be bound to 'instanceReady.ckeditor'
$oPage->add_ready_script("$('#$iId').bind('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n");
- $oPage->add_ready_script("$('#$iId').bind('update', function() { BlockField('cke_$iId', $('#$iId').attr('disabled')); } );\n");
+ $oPage->add_ready_script("$('#$iId').bind('update', function() { BlockField('cke_$iId', $('#$iId').attr('disabled')); $(this).data('ckeditorInstance').setReadOnly($(this).prop('disabled')); } );\n");
return $sHtmlValue;
}
diff --git a/css/light-grey.css b/css/light-grey.css
index 8abcb8dea..a70e8eff9 100644
--- a/css/light-grey.css
+++ b/css/light-grey.css
@@ -280,6 +280,11 @@ legend.transparent {
}
+.ui-widget-content td a.cke_toolbox_collapser {
+ padding-left: 0;
+}
+
+
p a:hover, td a:hover {
text-decoration: underline;
color: #e87c1e;
diff --git a/css/light-grey.scss b/css/light-grey.scss
index 085233952..99dd8528b 100644
--- a/css/light-grey.scss
+++ b/css/light-grey.scss
@@ -224,6 +224,9 @@ legend.transparent {
padding-left:14px;
background: url(../images/mini-arrow-orange.gif) no-repeat left;
}
+.ui-widget-content td a.cke_toolbox_collapser {
+ padding-left: 0;
+}
p a:hover, td a:hover {
text-decoration:underline;
color:$highlight-color;
diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js
index 8d71cff21..fd82aec51 100644
--- a/js/forms-json-utils.js
+++ b/js/forms-json-utils.js
@@ -233,25 +233,32 @@ function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue)
var bValid;
var sTextContent;
- // Get the contents without the tags
- var oFormattedContents = $("#cke_"+sFieldId+" iframe");
- if (oFormattedContents.length == 0)
+ if ($('#'+sFieldId).attr('disabled'))
{
- var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source");
- sTextContent = oSourceContents.val();
+ bValid = true; // disabled fields are not checked
}
else
{
- sTextContent = oFormattedContents.contents().find("body").text();
- }
-
- if (bMandatory && (sTextContent == ''))
- {
- bValid = false;
- }
- else
- {
- bValid = true;
+ // Get the contents without the tags
+ var oFormattedContents = $("#cke_"+sFieldId+" iframe");
+ if (oFormattedContents.length == 0)
+ {
+ var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source");
+ sTextContent = oSourceContents.val();
+ }
+ else
+ {
+ sTextContent = oFormattedContents.contents().find("body").text();
+ }
+
+ if (bMandatory && (sTextContent == ''))
+ {
+ bValid = false;
+ }
+ else
+ {
+ bValid = true;
+ }
}
ReportFieldValidationStatus(sFieldId, sFormId, bValid, '');