first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
?>
<div class="com-users-profile profile">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<?php if ($this->getCurrentUser()->id == $this->data->id) : ?>
<ul class="com-users-profile__edit btn-toolbar float-end">
<li class="btn-group">
<a class="btn btn-primary" href="<?php echo Route::_('index.php?option=com_users&task=profile.edit&user_id=' . (int) $this->data->id); ?>">
<span class="icon-user-edit" aria-hidden="true"></span> <?php echo Text::_('COM_USERS_EDIT_PROFILE'); ?>
</a>
</li>
</ul>
<?php endif; ?>
<?php echo $this->loadTemplate('core'); ?>
<?php echo $this->loadTemplate('params'); ?>
<?php echo $this->loadTemplate('custom'); ?>
</div>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_USERS_PROFILE_VIEW_DEFAULT_TITLE" option="COM_USERS_PROFILE_VIEW_DEFAULT_OPTION">
<help
key = "Menu_Item:_User_Profile"
/>
<message>
<![CDATA[COM_USERS_PROFILE_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,53 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<fieldset id="users-profile-core" class="com-users-profile__core">
<legend>
<?php echo Text::_('COM_USERS_PROFILE_CORE_LEGEND'); ?>
</legend>
<dl class="dl-horizontal">
<dt>
<?php echo Text::_('COM_USERS_PROFILE_NAME_LABEL'); ?>
</dt>
<dd>
<?php echo $this->escape($this->data->name); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_USERNAME_LABEL'); ?>
</dt>
<dd>
<?php echo $this->escape($this->data->username); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_REGISTERED_DATE_LABEL'); ?>
</dt>
<dd>
<?php echo HTMLHelper::_('date', $this->data->registerDate, Text::_('DATE_FORMAT_LC1')); ?>
</dd>
<dt>
<?php echo Text::_('COM_USERS_PROFILE_LAST_VISITED_DATE_LABEL'); ?>
</dt>
<?php if ($this->data->lastvisitDate !== null) : ?>
<dd>
<?php echo HTMLHelper::_('date', $this->data->lastvisitDate, Text::_('DATE_FORMAT_LC1')); ?>
</dd>
<?php else : ?>
<dd>
<?php echo Text::_('COM_USERS_PROFILE_NEVER_VISITED'); ?>
</dd>
<?php endif; ?>
</dl>
</fieldset>

View File

@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$fieldsets = $this->form->getFieldsets();
if (isset($fieldsets['core'])) {
unset($fieldsets['core']);
}
if (isset($fieldsets['params'])) {
unset($fieldsets['params']);
}
$tmp = $this->data->jcfields ?? [];
$customFields = [];
foreach ($tmp as $customField) {
$customFields[$customField->name] = $customField;
}
unset($tmp);
?>
<?php foreach ($fieldsets as $group => $fieldset) : ?>
<?php $fields = $this->form->getFieldset($group); ?>
<?php if (count($fields)) : ?>
<fieldset id="users-profile-custom-<?php echo $group; ?>" class="com-users-profile__custom users-profile-custom-<?php echo $group; ?>">
<?php if (isset($fieldset->label) && ($legend = trim(Text::_($fieldset->label))) !== '') : ?>
<legend><?php echo $legend; ?></legend>
<?php endif; ?>
<?php if (isset($fieldset->description) && trim($fieldset->description)) : ?>
<p><?php echo $this->escape(Text::_($fieldset->description)); ?></p>
<?php endif; ?>
<dl class="dl-horizontal">
<?php foreach ($fields as $field) : ?>
<?php // Correct the field name so that subform custom fields show up. ?>
<?php if ($field->type === 'Subform' && $field->fieldname === 'row') : ?>
<?php preg_match("/jform\[com_fields]\[(.*)]/", $field->name, $matches); ?>
<?php $field->fieldname = $matches[1]; ?>
<?php endif; ?>
<?php if (!$field->hidden && $field->type !== 'Spacer') : ?>
<dt>
<?php echo $field->title; ?>
</dt>
<dd>
<?php if (array_key_exists($field->fieldname, $customFields)) : ?>
<?php echo strlen($customFields[$field->fieldname]->value) ? $customFields[$field->fieldname]->value : Text::_('COM_USERS_PROFILE_VALUE_NOT_FOUND'); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->id)) : ?>
<?php echo HTMLHelper::_('users.' . $field->id, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->fieldname)) : ?>
<?php echo HTMLHelper::_('users.' . $field->fieldname, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->type)) : ?>
<?php echo HTMLHelper::_('users.' . $field->type, $field->value); ?>
<?php else : ?>
<?php echo HTMLHelper::_('users.value', $field->value); ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -0,0 +1,42 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<?php $fields = $this->form->getFieldset('params'); ?>
<?php if (count($fields)) : ?>
<fieldset id="users-profile-custom" class="com-users-profile__params">
<legend><?php echo Text::_('COM_USERS_SETTINGS_FIELDSET_LABEL'); ?></legend>
<dl class="dl-horizontal">
<?php foreach ($fields as $field) : ?>
<?php if (!$field->hidden) : ?>
<dt>
<?php echo $field->title; ?>
</dt>
<dd>
<?php if (HTMLHelper::isRegistered('users.' . $field->id)) : ?>
<?php echo HTMLHelper::_('users.' . $field->id, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->fieldname)) : ?>
<?php echo HTMLHelper::_('users.' . $field->fieldname, $field->value); ?>
<?php elseif (HTMLHelper::isRegistered('users.' . $field->type)) : ?>
<?php echo HTMLHelper::_('users.' . $field->type, $field->value); ?>
<?php else : ?>
<?php echo HTMLHelper::_('users.value', $field->value); ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
</fieldset>
<?php endif; ?>

View File

@ -0,0 +1,87 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/** @var Joomla\Component\Users\Site\View\Profile\HtmlView $this */
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');
// Load user_profile plugin language
$lang = $this->getLanguage();
$lang->load('plg_user_profile', JPATH_ADMINISTRATOR);
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
->useScript('form.validate');
?>
<div class="com-users-profile__edit profile-edit">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<form id="member-profile" action="<?php echo Route::_('index.php?option=com_users'); ?>" method="post" class="com-users-profile__edit-form form-validate form-horizontal well" enctype="multipart/form-data">
<?php // Iterate through the form fieldsets and display each one. ?>
<?php foreach ($this->form->getFieldsets() as $group => $fieldset) : ?>
<?php $fields = $this->form->getFieldset($group); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php // If the fieldset has a label set, display it as the legend. ?>
<?php if (isset($fieldset->label)) : ?>
<legend>
<?php echo Text::_($fieldset->label); ?>
</legend>
<?php endif; ?>
<?php if (isset($fieldset->description) && trim($fieldset->description)) : ?>
<p>
<?php echo $this->escape(Text::_($fieldset->description)); ?>
</p>
<?php endif; ?>
<?php // Iterate through the fields in the set and display them. ?>
<?php foreach ($fields as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($this->mfaConfigurationUI) : ?>
<fieldset class="com-users-profile__multifactor">
<legend><?php echo Text::_('COM_USERS_PROFILE_MULTIFACTOR_AUTH'); ?></legend>
<?php echo $this->mfaConfigurationUI ?>
</fieldset>
<?php endif; ?>
<div class="com-users-profile__edit-submit control-group">
<div class="controls">
<button type="submit" class="btn btn-primary validate" name="task" value="profile.save">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('JSAVE'); ?>
</button>
<button type="submit" class="btn btn-danger" name="task" value="profile.cancel" formnovalidate>
<span class="icon-times" aria-hidden="true"></span>
<?php echo Text::_('JCANCEL'); ?>
</button>
<input type="hidden" name="option" value="com_users">
</div>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_USERS_PROFILE_EDIT_DEFAULT_TITLE" option="COM_USERS_PROFILE_EDIT_DEFAULT_OPTION">
<help
key = "Menu_Item:_Edit_User_Profile"
/>
<message>
<![CDATA[COM_USERS_PROFILE_EDIT_DEFAULT_DESC]]>
</message>
</layout>
</metadata>