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

View File

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