Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/zenit/plugins/user/profile/src/Field/ |
Upload File : |
<?php
/**
* @package Joomla.Plugin
* @subpackage User.profile
*
* @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Plugin\User\Profile\Field;
\defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\CalendarField;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
/**
* Provides input for "Date of Birth" field
*
* @package Joomla.Plugin
* @subpackage User.profile
* @since 3.3.7
*/
class DobField extends CalendarField
{
/**
* The form field type.
*
* @var string
* @since 3.3.7
*/
protected $type = 'Dob';
/**
* Method to get the field label markup.
*
* @return string The field label markup.
*
* @since 3.3.7
*/
protected function getLabel()
{
$label = parent::getLabel();
// Get the info text from the XML element, defaulting to empty.
$text = $this->element['info'] ? (string) $this->element['info'] : '';
$text = $this->translateLabel ? Text::_($text) : $text;
if ($text)
{
$app = Factory::getApplication();
$view = $app->input->getString('view', '');
// Only display the tip when editing profile
if ($view === 'registration' || $view === 'profile' || $app->isClient('administrator'))
{
$layout = new FileLayout('plugins.user.profile.fields.dob');
$info = $layout->render(array('text' => $text));
$label = $info . $label;
}
}
return $label;
}
}