Reordered some helper class code in the GUI. Fixed gh-663 so that the label is used in the filter instead of the code_name. Renames field to Modeling Method in the field area.

This commit is contained in:
2021-01-30 15:36:03 +02:00
parent 60f4e8af32
commit 54a86fb530
42 changed files with 1791 additions and 2243 deletions

View File

@ -4725,19 +4725,40 @@ class Fields extends Structure
}
else
{
// set lang (just in case)
$listLangName = $langView . '_'
. ComponentbuilderHelper::safeFieldName($name, true);
// set field name
$listFieldName = ComponentbuilderHelper::safeString($name, 'W');
// add to lang array
$this->setLangContent(
$this->lang, $listLangName, $listFieldName
);
// if label was set use instead
if (ComponentbuilderHelper::checkString($langLabel))
{
$listLangName = $langLabel;
// get field label from the lang label
if (isset($this->langContent[$this->lang][$langLabel]))
{
$listFieldName
= $this->langContent[$this->lang][$langLabel];
}
else
{
// get it from the field xml string
$listFieldName = (string) $this->setPlaceholders(
ComponentbuilderHelper::getBetween(
$field['settings']->xml, 'label="',
'"'
), $this->placeholders
);
}
// make sure there is no html in the list field name
$listFieldName = strip_tags($listFieldName);
}
else
{
// set lang (just in case)
$listLangName = $langView . '_'
. ComponentbuilderHelper::safeFieldName($name, true);
// set field name
$listFieldName = ComponentbuilderHelper::safeString($name, 'W');
// add to lang array
$this->setLangContent(
$this->lang, $listLangName, $listFieldName
);
}
}
// build the list values