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

View File

@@ -2154,18 +2154,11 @@ class ProcessField extends Process implements ConfigurableModule {
$form->attr('class', 'WireTab'); $form->attr('class', 'WireTab');
$form->attr('title', $this->_x('Advanced', 'tab')); $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 */ /** @var InputfieldTextTags $field */
$field = $this->wire()->modules->getInstall('InputfieldTextTags'); $field = $this->wire()->modules->getInstall('InputfieldTextTags');
$field->attr('name', 'tags'); $field->attr('name', 'tags');
$field->allowUserTags = true; $field->allowUserTags = true;
if(count($tags)) $field->setTagsList($tags); $field->setTagsList($this->wire()->fields->getTags());
$field->attr('value', $this->field->getTags(true)); $field->attr('value', $this->field->getTags(true));
$field->icon = 'tags'; $field->icon = 'tags';
$field->label = $this->labels['tags']; $field->label = $this->labels['tags'];
@@ -2574,7 +2567,7 @@ class ProcessField extends Process implements ConfigurableModule {
} }
if($name === 'tags') { if($name === 'tags') {
$value = $sanitizer->getTextTools()->strtolower($sanitizer->words($value)); $value = $sanitizer->words($value);
} }
$this->field->set($name, $value); $this->field->set($name, $value);