Unverified Commit 294c8d64 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(simpleplugin) Show DateAttribute as text input in templates

issue #6055
Showing with 13 additions and 0 deletions
+13 -0
......@@ -167,6 +167,19 @@ class DateAttribute extends Attribute
$display = $this->renderInputField('date', $this->getHtmlId(), $attributes);
return $this->renderAcl($display);
}
function renderTemplateInput (): string
{
$id = $this->getHtmlId();
$attributes = [
'value' => '{literal}'.htmlentities($this->getValue(), ENT_COMPAT, 'UTF-8').'{/literal}'
];
if ($this->isSubAttribute) {
$attributes['class'] = 'subattribute';
}
$display = $this->renderInputField('text', $id, $attributes);
return $this->renderAcl($display);
}
}
/*!
......
Supports Markdown
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