1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00
This commit is contained in:
Ryan Cramer
2025-02-06 11:04:21 -05:00
parent 0708865081
commit 59ae7f4c7f

View File

@@ -2153,19 +2153,12 @@ class ProcessField extends Process implements ConfigurableModule {
$form->attr('id', 'advanced');
$form->attr('class', 'WireTab');
$form->attr('title', $this->_x('Advanced', 'tab'));
$tags = array();
$textTools = $this->wire()->sanitizer->getTextTools();
foreach($this->wire()->fields->getTags() as $tagKey => $tagValue) {
$tagKey = $textTools->strtolower($tagKey);
$tags[$tagKey] = $tagValue;
}
ksort($tags);
/** @var InputfieldTextTags $field */
$field = $this->wire()->modules->getInstall('InputfieldTextTags');
$field->attr('name', 'tags');
$field->allowUserTags = true;
if(count($tags)) $field->setTagsList($tags);
$field->setTagsList($this->wire()->fields->getTags());
$field->attr('value', $this->field->getTags(true));
$field->icon = 'tags';
$field->label = $this->labels['tags'];
@@ -2574,7 +2567,7 @@ class ProcessField extends Process implements ConfigurableModule {
}
if($name === 'tags') {
$value = $sanitizer->getTextTools()->strtolower($sanitizer->words($value));
$value = $sanitizer->words($value);
}
$this->field->set($name, $value);