BUG 11998: No se estan respetando los espacios generados en un XML SOLVED
- Cuando se modifica el XML de un formulario, campos, espacios, etc, y se regresa a la vista XML se puede ver que los espacios añadidos son eliminados. - Adjustment in the xml file of the tabulated a dynaform.
This commit is contained in:
@@ -163,6 +163,7 @@ class dynaFormHandler
|
|||||||
}
|
}
|
||||||
if ($childs_childs != null and is_array($childs_childs)) {
|
if ($childs_childs != null and is_array($childs_childs)) {
|
||||||
foreach ($childs_childs as $cc) {
|
foreach ($childs_childs as $cc) {
|
||||||
|
$newnode_child->appendChild($this->dom->createTextNode("\n" . str_repeat(" ", 6)));
|
||||||
$ccmode = $newnode_child->appendChild($this->dom->createElement($cc['name']));
|
$ccmode = $newnode_child->appendChild($this->dom->createElement($cc['name']));
|
||||||
$ccmode->appendChild($this->dom->createTextNode($cc['value']));
|
$ccmode->appendChild($this->dom->createTextNode($cc['value']));
|
||||||
foreach ($cc['attributes'] as $cc_att_name => $cc_att_value) {
|
foreach ($cc['attributes'] as $cc_att_name => $cc_att_value) {
|
||||||
@@ -249,11 +250,16 @@ class dynaFormHandler
|
|||||||
|
|
||||||
foreach ($childs as $child_name => $child_text) {
|
foreach ($childs as $child_name => $child_text) {
|
||||||
|
|
||||||
$newnode->appendChild($this->dom->createTextNode(" "));
|
$newnode->appendChild($this->dom->createTextNode("\n" . str_repeat(" ", 4)));
|
||||||
$newnode_child = $newnode->appendChild($this->dom->createElement($child_name));
|
$newnode_child = $newnode->appendChild($this->dom->createElement($child_name));
|
||||||
if (is_string($child_text)) {
|
if (is_string($child_text)) {
|
||||||
$newnode_child->appendChild($this->dom->createTextNode($child_text));
|
if (strip_tags($child_text) !== $child_text) {
|
||||||
|
$newnode_child->appendChild($this->dom->createCDATASection($child_text));
|
||||||
} else {
|
} else {
|
||||||
|
$newnode_child->appendChild($this->dom->createTextNode($child_text));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
if (is_array($child_text) && isset($child_text['cdata'])) {
|
if (is_array($child_text) && isset($child_text['cdata'])) {
|
||||||
$newnode_child->appendChild($this->dom->createCDATASection($child_text));
|
$newnode_child->appendChild($this->dom->createCDATASection($child_text));
|
||||||
}
|
}
|
||||||
@@ -261,6 +267,7 @@ class dynaFormHandler
|
|||||||
if ($child_name == SYS_LANG) {
|
if ($child_name == SYS_LANG) {
|
||||||
if ($childs_childs != null and is_array($childs_childs)) {
|
if ($childs_childs != null and is_array($childs_childs)) {
|
||||||
foreach ($childs_childs as $cc) {
|
foreach ($childs_childs as $cc) {
|
||||||
|
$newnode_child->appendChild($this->dom->createTextNode("\n" . str_repeat(" ", 6)));
|
||||||
$ccmode = $newnode_child->appendChild($this->dom->createElement($cc['name']));
|
$ccmode = $newnode_child->appendChild($this->dom->createElement($cc['name']));
|
||||||
$ccmode->appendChild($this->dom->createTextNode($cc['value'] ));
|
$ccmode->appendChild($this->dom->createTextNode($cc['value'] ));
|
||||||
foreach ($cc['attributes'] as $cc_att_name => $cc_att_value) {
|
foreach ($cc['attributes'] as $cc_att_name => $cc_att_value) {
|
||||||
@@ -279,8 +286,7 @@ class dynaFormHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$newnode->appendChild($this->dom->createTextNode("\n" . str_repeat(" ", 2)));
|
||||||
$newnode->appendChild($this->dom->createTextNode("\n"));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isset($childs)) {
|
if (isset($childs)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user