Traduction des données des profils, nom et commentaire

This commit is contained in:
Fred Tempez 2023-08-08 18:15:16 +02:00
parent 07aa29e4bc
commit cc90fc2273
2 changed files with 7 additions and 7 deletions

View File

@ -489,8 +489,8 @@ class user extends common
) {
self::$userGroups[$groupId] = [
$groupId,
$groupData['name'],
nl2br($groupData['comment']),
helper::translate($groupData['name']),
nl2br(helper::translate($groupData['comment'])),
template::button('profilEdit' . $groupId, [
'href' => helper::baseUrl() . 'user/profilEdit/' . $groupId,
'value' => template::ico('pencil'),
@ -513,8 +513,8 @@ class user extends common
foreach ($groupData as $profilId => $profilData) {
self::$userGroups[$groupId . '.' . $profilId] = [
$groupId . '-' . $profilId,
self::$groups[$groupId] . '<br />Profil : ' . $profilData['name'],
nl2br($profilData['comment']),
helper::translate(self::$groups[$groupId]). '<br />Profil : ' . helper::translate($profilData['name']),
nl2br(helper::translate($profilData['comment'])),
template::button('profilEdit' . $groupId . $profilId, [
'href' => helper::baseUrl() . 'user/profilEdit/' . $groupId . '/' . $profilId,
'value' => template::ico('pencil'),

View File

@ -25,7 +25,7 @@
<div class="col6">
<?php echo template::text('profilEditName', [
'label' => 'Nom du profil',
'value' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name'])
'value' => helper::translate($this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name']))
]); ?>
</div>
<div class="col6">
@ -41,7 +41,7 @@
<div class="col12">
<?php echo template::text('profilEditDisplayGroup', [
'label' => 'Groupe associé',
'value' => self::$groups[$this->getUrl(2)],
'value' => helper::translate(self::$groups[$this->getUrl(2)]),
'disabled' => true
]); ?>
<?php echo template::hidden('profilEditGroup', [
@ -56,7 +56,7 @@
<div class="col6">
<?php echo template::textarea('profilEditComment', [
'label' => 'Commentaire',
'value' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'comment'])
'value' => helper::translate($this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'comment']))
]); ?>
</div>
</div>