Commit 74daaa97 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#3425 / Form.parameter, FormElement.parameter: comment handling, trailing & leading spaces

HelpFormElement.php: Introduced new constants HTML_DELIMITER_NAME, HTML_DELIMITER_ID
AbstractBuildForm.php: Saving 'extra' FE in STORE_SIP has been done with inappropiate FE_NAME. Correct is the pure FE_NAME, without any extension like recordId. Unessary and broken decoding removed.
parent f86bafee
......@@ -1694,9 +1694,9 @@ abstract class AbstractBuildForm {
if ($mode === FORM_LOAD) {
// Split 'grId:0' in 'grId' and '0'
$name = explode(':', $htmlFormElementName, 2);
$this->store->setVar($name[0], $value, STORE_SIP, false);
// $name = explode(':', $htmlFormElementName, 2);
// $this->store->setVar($name[0], $value, STORE_SIP, false);
$this->store->setVar($formElement[FE_NAME], $value, STORE_SIP, false);
}
}
......
......@@ -688,6 +688,9 @@ const ESCAPE_WITH_HTML_QUOTE = 'htmlquote';
const FLAG_ALL = 'flagAll';
const FLAG_DYNAMIC_UPDATE = 'flagDynamicUpdate';
const HTML_DELIMITER_NAME = '-';
const HTML_DELIMITER_ID = HTML_DELIMITER_NAME;
const HTML_ID_EXTENSION_LABEL = '-l';
const HTML_ID_EXTENSION_INPUT = '-i';
const HTML_ID_EXTENSION_NOTE = '-n';
......
......@@ -72,7 +72,7 @@ class HelperFormElement
*/
public static function buildFormElementName($field, $id)
{
return "$field-$id";
return "$field" . HTML_DELIMITER_NAME . "$id";
}
/**
......@@ -85,7 +85,7 @@ class HelperFormElement
* @return string
*/
public static function buildFormElementId($formId, $formElementId, $recordId, $formElementCopy) {
return "$formId-$formElementId-$recordId-$formElementCopy";
return "$formId" . HTML_DELIMITER_ID . "$formElementId" . HTML_DELIMITER_ID . "$recordId" . HTML_DELIMITER_ID . "$formElementCopy";
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment