Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent 07591a49d7
commit 954e2740bc
  1. 9
      main/inc/lib/formvalidator/Element/HtmlEditor.php
  2. 15
      main/inc/lib/pear/HTML/QuickForm/textarea.php
  3. 5
      src/Chamilo/CoreBundle/Component/Editor/Editor.php

@ -31,7 +31,7 @@ class HtmlEditor extends HTML_QuickForm_textarea
$config = array()
) {
if (empty($name)) {
return false;
}
@ -58,7 +58,6 @@ class HtmlEditor extends HTML_QuickForm_textarea
if ($this->editor) {
if ($this->editor->getConfigAttribute('fullPage')) {
if (strlen(trim($value)) == 0) {
// TODO: To be considered whether here to be added DOCTYPE,
// language and character set declarations.
@ -73,11 +72,10 @@ class HtmlEditor extends HTML_QuickForm_textarea
return $this->getFrozenHtml();
} else {
$styleCss = $this->editor->getConfigAttribute('style');
if ($styleCss) {
$style = true;
$style = true;
} else {
$style = false;
$style = false;
}
return $this->buildEditor($style);
@ -104,7 +102,6 @@ class HtmlEditor extends HTML_QuickForm_textarea
if ($this->editor) {
$this->editor->value = $this->getValue();
$this->editor->setName($this->getName());
if ($style == true) {
$result = $this->editor->createHtmlStyle();
} else {

@ -43,7 +43,6 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
* @access private
*/
public $_value = null;
private $columnsSize;
// }}}
// {{{ constructor
@ -132,7 +131,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
// }}}
// {{{ setWrap()
/**
* Sets wrap type for textarea element
*
@ -224,7 +223,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
}
return $html . $this->_getPersistantData();
}
/**
* @return null
*/
@ -240,7 +239,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
{
$this->columnsSize = $columnsSize;
}
/**
* @param string $layout
*
@ -250,7 +249,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
{
$size = $this->getColumnsSize();
$this->removeAttribute('cols-size');
if (empty($size)) {
$size = [2, 8, 2];
}
@ -291,7 +290,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
<!-- END label_3 -->
</div>
</div>';
break;
case FormValidator::LAYOUT_BOX_NO_LABEL:
return '
@ -304,6 +303,6 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
break;
}
}
}

@ -89,7 +89,7 @@ class Editor
public function createHtml()
{
$html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'">'.$this->value.'</textarea>';
//$html .= $this->editorReplace();
return $html;
}
@ -102,6 +102,7 @@ class Editor
$toolbar->setLanguage($this->getLocale());
$config = $toolbar->getConfig();
$javascript = $this->toJavascript($config);
$html = "<script>
CKEDITOR.replace('".$this->name."',
$javascript
@ -141,7 +142,7 @@ class Editor
addslashes($var)
).'"';
break;
case 'array':
case 'array':
// Arrays in JSON can't be associative. If the array is empty or if it
// has sequential whole number keys starting with 0, it's not associative
// so we can go ahead and convert it as an array.

Loading…
Cancel
Save