user comment okay

This commit is contained in:
Fred Tempez 2023-05-29 09:18:32 +02:00
parent 44581b4682
commit 7c7c36a5e6
3 changed files with 9 additions and 7 deletions

View File

@ -164,7 +164,7 @@ class user extends common
} }
foreach ($profilData as $key => $value) { foreach ($profilData as $key => $value) {
self::$userProfils[$profilId][$key] = $profilData[$key]['name']; self::$userProfils[$profilId][$key] = $profilData[$key]['name'];
self::$userProfilsComments[$profilId][$key] = $profilData[$key]['comment']; self::$userProfilsComments[$profilId][$key] = $profilData[$key]['name'] . ' : ' . $profilData[$key]['comment'];
} }
} }

View File

@ -41,7 +41,9 @@ $("#userAddId").on("change keydown keyup", function(event) {
*/ */
$("#userAddGroup").on("change", function() { $("#userAddGroup").on("change", function() {
$(".userAddGroupProfil").hide(); $(".userAddGroupProfil").hide();
$(".userCommentProfil").hide();
$("#userAddGroupProfil" + $(this).val()).show(); $("#userAddGroupProfil" + $(this).val()).show();
$("#userCommentProfil" + $(this).val()).show();
}).trigger("change"); }).trigger("change");

View File

@ -109,21 +109,21 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div id="commentProfil<?php echo self::GROUP_MEMBER; ?>" class="col12"> <div id="userCommentProfil<?php echo self::GROUP_MEMBER; ?>" class="col12 displayNone userCommentProfil">
<?php echo template::textarea('useraddProfilComment' . self::GROUP_MEMBER, [ <?php echo template::textarea('useraddProfilComment' . self::GROUP_MEMBER, [
"value" => implode("\n",$module::$userProfils[self::GROUP_MEMBER]) "value" => implode("\n",$module::$userProfilsComments[self::GROUP_MEMBER])
]); ]);
?> ?>
</div> </div>
<div id="commentProfil<?php echo self::GROUP_MODERATOR; ?>" class="col12"> <div id="userCommentProfil<?php echo self::GROUP_MODERATOR; ?>" class="col12 displayNone userCommentProfil">
<?php echo template::textarea('useraddProfilComment2' . self::GROUP_MODERATOR, [ <?php echo template::textarea('useraddProfilComment2' . self::GROUP_MODERATOR, [
"value" => implode("\n",$module::$userProfils[self::GROUP_MODERATOR]) "value" => implode("\n",$module::$userProfilsComments[self::GROUP_MODERATOR])
]); ]);
?> ?>
</div> </div>
<div id="commentProfil<?php echo self::GROUP_ADMIN; ?>" class="col12"> <div id="userCommentProfil<?php echo self::GROUP_ADMIN; ?>" class="col12 displayNone userCommentProfil">
<?php echo template::textarea('useraddProfilComment' . self::GROUP_ADMIN, [ <?php echo template::textarea('useraddProfilComment' . self::GROUP_ADMIN, [
"value" => implode("\n",$module::$userProfils[self::GROUP_ADMIN]) "value" => implode("\n",$module::$userProfilsComments[self::GROUP_ADMIN])
]); ]);
?> ?>
</div> </div>