From 47c7b2f4eee1cf018701ef0b061c464157086ca2 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos <1697880+AngelFQC@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:17:20 -0500 Subject: [PATCH] Display: Fix template for DatePicker element --- .../lib/formvalidator/Element/DatePicker.php | 27 ++++++++----------- src/CoreBundle/Component/Utils/ActionIcon.php | 2 ++ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/public/main/inc/lib/formvalidator/Element/DatePicker.php b/public/main/inc/lib/formvalidator/Element/DatePicker.php index eb09e3f278..a92af87f39 100644 --- a/public/main/inc/lib/formvalidator/Element/DatePicker.php +++ b/public/main/inc/lib/formvalidator/Element/DatePicker.php @@ -2,7 +2,8 @@ /* For licensing terms, see /license.txt */ -use Chamilo\CoreBundle\Component\Utils\ToolIcon; +use Chamilo\CoreBundle\Component\Utils\ActionIcon; +use Chamilo\CoreBundle\Component\Utils\ObjectIcon; use Chamilo\CoreBundle\Framework\Container; /** @@ -20,7 +21,7 @@ class DatePicker extends HTML_QuickForm_text if (!isset($attributes['id'])) { $attributes['id'] = $elementName; } - $attributes['class'] = 'form-control border flex-grow'; + $attributes['class'] = 'p-component p-inputtext p-filled'; parent::__construct($elementName, $elementLabel, $attributes); $this->_appendName = true; @@ -57,20 +58,18 @@ class DatePicker extends HTML_QuickForm_text $requiredSymbol = '*'; } - $attrs = $this->_attributes; - unset($attrs['id']); + $this->setAttribute('placeholder', get_lang('Select date')); return ' -
'.$requiredSymbol.$label.'
-
- _getAttrString($this->_attributes).' - value="'.$value.'" placeholder="'.get_lang('Select date').'" data-input> + +
+ _getAttrString($this->_attributes).' value="'.$value.'" data-input>
@@ -109,7 +108,7 @@ class DatePicker extends HTML_QuickForm_text return "